Change Roll Frequency of the Audit Log
Audit records are written to the log file /var/log/knox/gateway-audit.log and by default roll monthly. When the log rolls, the date that it rolled is appended to the end of the current log file and a new one is created.
$gateway /conf/gateway-log4j.propertiesfile in a text editor.
log4j.appender.auditfile.DatePattern = $interval.
$intervalis one of the following:
Rollover at the beginning of each month
Rollover at the first day of each week. The first day of the week depends on the locale.
Rollover at midnight each day.
Rollover at midnight and midday of each day.
Rollover at the top of every hour.
Rollover at the beginning of every minute.Tip
For more examples, see “Apache log4j: Class DailyRollingFileAppender”.
- Save the file.
- Restart the gateway:
cd $gateway bin/gateway.sh stop bin/gateway.sh start.