Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hi Team,
we are having the default audit log rotation ie the audit log file rotates if it reaches 100MB in Design Node, but I want to configure Audit logs to rotate on daily basis, could anyone tell me how to setup this configuration.
Thanks in advance.
Regards,
PPK
Hi @kpk_devops
It's important to note that log retention is not time-based but size-based. So your audit.log files are rotated when they reach a given size and purged after a given number of rotations. If you need to change this, in your DSS_DATA_DIRECTORY, create a directory and subdirectory called resources/logging
. In the logging directory, add a file called dku-log4j.properties
. Fill it with the next lines (defaults):
log4j.appender.AUDITFILE.MaxFileSize=100MB
log4j.appender.AUDITFILE.MaxBackupIndex=20
or depending on your needs and restart DSS to apply the changes.
Hi @kpk_devops
It's important to note that log retention is not time-based but size-based. So your audit.log files are rotated when they reach a given size and purged after a given number of rotations. If you need to change this, in your DSS_DATA_DIRECTORY, create a directory and subdirectory called resources/logging
. In the logging directory, add a file called dku-log4j.properties
. Fill it with the next lines (defaults):
log4j.appender.AUDITFILE.MaxFileSize=100MB
log4j.appender.AUDITFILE.MaxBackupIndex=20
or depending on your needs and restart DSS to apply the changes.
Thank you very much for the reply, it worked and resolved my issue.
Also can you help what the different properties values I can put in dku-log4j.properties file ? I know Size, BackupIndex, Day, is there any reference document for this properties values ?
Thanks in advance.
Regards,
PK
Glad to hear this was helpful. In terms of DSS there are only these properties:
log4j.appender.AUDITFILE=org.apache.log4j.RollingFileAppender
log4j.appender.AUDITFILE.File=${DIP_HOME}/run/audit/audit.log
log4j.appender.AUDITFILE.MaxFileSize=100MB
log4j.appender.AUDITFILE.MaxBackupIndex=20
log4j.appender.AUDITFILE.layout=com.dataiku.dip.logging.JSONAuditLayout