How to Rotate AEM Logs

Adobe Experience Manager (AEM) produces extensive logs that are crucial for system monitoring and troubleshooting. As these logs can grow substantially over time, it is essential to have a strategy for handling their rotation. This guide will walk you through how to rotate AEM logs.

Key Takeaways

  • Log rotation in AEM helps manage the size of log files by periodically archiving old entries.
  • AEM uses the Apache Sling Log Support to handle log rotation.
  • You can configure log rotation settings through the AEM Web Console.
  • Testing and verifying your log rotation setup is crucial to ensure proper functioning.

Understanding Log Rotation

Log rotation involves periodically archiving old log entries and starting a new log file. This process helps manage the size of log files, preventing them from becoming too large and difficult to handle.

The Importance of Log Rotation in AEM

Without log rotation, log files can grow indefinitely, consuming disk space and making log analysis difficult. By rotating logs, you can keep your AEM instance running smoothly and your logs manageable.

AEM Logs and Apache Sling Log Support

AEM uses Apache Sling Log Support for its log management, which provides a web interface to view and download logs, manage log levels, and configure log rotation.

Accessing the Apache Sling Log Support

You can access the Apache Sling Log Support through the AEM Web Console at http://<your-AEM-instance>/system/console/slinglog.

Configuring Log Rotation in AEM

To rotate AEM logs, you need to configure log rotation settings through the Web Console.

  1. Navigate to the Log Support: Access the Apache Sling Log Support in the AEM Web Console.
  2. Select a Logger: Choose the logger for which you want to configure log rotation.
  3. Configure Rotation Settings: Set the rotation size (in MB) and the maximum number of history files to keep.

Note: AEM rotates a log file when it reaches the rotation size and keeps the number of log history files specified.

Testing Log Rotation

After configuring log rotation, it’s important to test it to ensure it’s working as expected.

  1. Generate Log Entries: You can generate log entries by performing actions in AEM.
  2. Check the Logs: After generating sufficient log entries, check if a new log file has been created and old entries have been archived.

Managing AEM Log Rotation

Managing log rotation in AEM involves regularly reviewing and adjusting rotation settings based on your needs.

  1. Regularly Review Rotation Settings: Review your rotation settings regularly to make sure they are still suitable for your needs.
  2. Adjust Settings as Needed: If necessary, adjust the rotation size and the number of history files to keep.


Log rotation is a crucial aspect of managing AEM logs. By understanding how log rotation works in AEM and following the steps outlined in this guide, you can effectively rotate AEM logs and keep your log files manageable. This will help you maintain a healthy and efficient AEM instance.

Leave a Reply

Your email address will not be published. Required fields are marked *