Enabling and Managing Audit Logs in AEM 6
This article explores how to enable and manage audit logs in Adobe Experience Manager (AEM) and why it plays a crucial role in monitoring activities, resolving content issues, and understanding interactions within the platform.
Description description
Environment
- Adobe Experience Manager 6.4 (AEM 6.4)
- Adobe Experience Manager 6.5 (AEM 6.5)
Issue/Symptoms
Audit logs are vital for debugging content issues and tracking various activities within AEM environments. They provide insights into who performed specific actions and what changes were made.
- How to enable audit logs in AEM?
- How to read and understand audit logs?
- Enabling audit logs on the file system.
- Audit logs for user creation and modification.
- Archiving and purging audit logs.
Resolution resolution
Enabling Audit Logs in AEM 6
By default, AEM’s audit logs are pre-configured to track basic operations related to DAM. Additionally, they cover all other activities involving pages, replication, and similar operations.
To configure audit logs for all operations or according to your needs for assets, follow these steps:
-
Access the system console and verify the configuration for Adobe CQ DAM Event Audit Listener. Ensure that it is enabled; if it isn’t, enable it.
-
Ensure that all required events are selected in the configuration. By default, a few events are checked, but you can select additional events as needed. This can be done under Day CQ DAM Event Recorder.
These configurations will enable audit logging for the specified events in DAM. Test the setup by performing various operations (modification, replication, deletion) on any asset or page through the console.
Reading and Understanding Audit Logs
-
Audit logs are available in the node structure under the path
/var/audit/
withinCRX/DE
. -
To read audit logging on the file system, follow these steps:
-
Navigate to: http://localhost:4502/system/console/slinglog.
-
Locate the ``audit.log
entry (not
auditlog.log)
and adjust the log level to either Debug or Trace. -
Save the changes.
-
The audit logs will then be recorded in the
/crx-quickstart/logs
directory, just like other log files. -
How can you archive or remove audit logs?
Note: Audit logs can consume significant disk space, both on the file system and within the CRX/DE
node structure located at /var/audit/
. Therefore, it is crucial to configure audit log purging in AEM to manage and minimize space usage in both areas.
- In AEM, you have a built-in mechanism for purging audit logs directly from
CRX/DE
. Reference the Audit Log Maintenance in AEM 6 in the AEM 6.5 User Guide. - For logs stored in the
crx-quickstart/logs
folder on the file system, you should either develop a script to purge these log files to free up disk space or move them to a different location or server.