Logs in Ozone

AuditLog

AuditLogs configurations are set in “*-audit-log4j2.properties” files. We can change the corresponding files to update the audit log policies for each component.

Deletion of AuditLog

The default log appender is Rolling appender, the following configurations can be added for deletion of out-of-date AuditLogs.

appender.rolling.strategy.type=DefaultRolloverStrategy
appender.rolling.strategy.delete.type=Delete
appender.rolling.strategy.delete.basePath=${sys:hadoop.log.dir}
appender.rolling.strategy.delete.maxDepth=1
appender.rolling.strategy.delete.ifFileName.type=IfFileName
appender.rolling.strategy.delete.ifFileName.glob=om-audit-*.log.gz
appender.rolling.strategy.delete.ifLastModified.type=IfLastModified
appender.rolling.strategy.delete.ifLastModified.age=30d

For more details, please check Log4j2 Delete on Rollover.

Next >>