Creating a rotating audit log file#

You can create rotating audit log file at a regular interval, such as every day.

You can create a rotating audit log file by adding the audit-log-to-file appenders to the Starting with, you can find the appenders in the file. Go to Settings > Logging, and uncomment the respective appenders.

The following code fragment shows the audit-log-to-file appenders to be used to create a rotating audit log file:

log4j.logger.AuditLog=DEBUG, audit-log-to-file
  1. Edit the file.

    Use a text editor to edit the file. You can also access the file by clicking Settings > Logging.

  2. Modify the appenders.

  3. Restart the server.

  4. Verify the logs generating in the /var/log/audit.log file.

This feature works especially well with audit log cleanup enabled. Go to Settings > System > Audit Log > Audit Log settings > Enable Audit Log Cleanup to enable audit log cleanup. Additionally, configure your audit log settings from the Server settings as required.

Parent topic: Logging