ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Artem Ervits <artemerv...@gmail.com>
Subject hdfs-audit.log log4j
Date Mon, 02 Mar 2015 18:33:54 GMT
Hello all,

I am trying to replace the default DailyRollingFileAppender entry for
hdfs-audit.log with RollingFileAppender so that I could set maxbackupindex.
Basically, I am trying to purge hdfs-audit logs older than 7 days. Can
someone suggest if anything is wrong here?

I have the following:

#
# hdfs audit logging
#
hdfs.audit.logger=INFO,console
hdfs.audit.log.maxfilesize=256MB
hdfs.audit.log.maxbackupindex=7
log4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=${hdfs.audit.logger}
log4j.additivity.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=false
log4j.appender.RFAAUDIT=org.apache.log4j.RollingFileAppender
log4j.appender.RFAAUDIT.File=${hadoop.log.dir}/hdfs-audit.log
log4j.appender.RFAAUDIT.layout=org.apache.log4j.PatternLayout
log4j.appender.RFAAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
log4j.appender.RFAAUDIT.MaxFileSize=${hdfs.audit.log.maxfilesize}
log4j.appender.RFAAUDIT.MaxBackupIndex=${hdfs.audit.log.maxbackupindex}

Mime
View raw message