hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "HowToConfigure" by ChrisDouglas
Date Thu, 14 Aug 2008 00:41:26 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The following page has been changed by ChrisDouglas:
http://wiki.apache.org/hadoop/HowToConfigure

------------------------------------------------------------------------------
   log4j.logger.org.apache.hadoop.mapred.!TaskTracker=DEBUG
  in your log4j.properties.
  
+ === Audit Logging ===
+ 
+ In 0.18 and later, one can enable audit logging from the Namenode. By default, events logged
to this appender are forwarded to the Namenode log, which will radically increase the number
of events emitted from that interface (see example). Audit events are emitted as a set of
key=value pairs for the following keys:
+ 
+ Format
+ || '''key''' || '''value''' ||
+ || ugi || <user>,<group>[,<group>]* ||
+ || ip  || <client ip address> ||
+ || cmd || (open|create|delete|rename|mkdirs|listStatus|setReplication|setOwner|setPermission)
||
+ || src || <path> ||
+ || dst || (<path>|"null") ||
+ || perm || (<user>:<group>:<perm mask>|"null") ||
+ 
+ Sample line of audit output:
+ {{{
+ <log4j header> ugi=wsmith,users,staff ip=/192.168.0.10 cmd=mkdirs src=/foo/bar dst=null
perm=wsmith:staff:rwxr-xr-x
+ }}}
+ 
+ Example logging audit events to rolling log, syslog:
+ {{{
+ # Log at INFO level to DRFAAUDIT, SYSLOG appenders
+ log4j.logger.org.apache.hadoop.fs.FSNamesystem.audit=INFO,DRFAAUDIT,SYSLOG
+ 
+ # Do not forward audit events to parent appenders (i.e. namenode)
+ log4j.additivity.org.apache.hadoop.fs.FSNamesystem.audit=false
+ 
+ # Configure local appender
+ log4j.appender.DRFAAUDIT=org.apache.log4j.DailyRollingFileAppender
+ log4j.appender.DRFAAUDIT.File=/var/log/audit.log
+ log4j.appender.DRFAAUDIT.DatePattern=.yyyy-MM-dd
+ log4j.appender.DRFAAUDIT.layout=org.apache.log4j.PatternLayout
+ log4j.appender.DRFAAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
+ 
+ # Configure syslog appender
+ log4j.appender.SYSLOG=org.apache.log4j.net.SyslogAppender
+ log4j.appender.SYSLOG.syslogHost=loghost
+ log4j.appender.SYSLOG.layout=org.apache.log4j.PatternLayout
+ log4j.appender.SYSLOG.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
+ log4j.appender.SYSLOG.Facility=LOCAL1
+ }}}
+ 

Mime
View raw message