ramangrover29 | 116eb97 | 2013-02-20 20:47:35 +0000 | [diff] [blame^] | 1 | # Define some default values that can be overridden by system properties |
| 2 | zookeeper.root.logger=SEVERE, CONSOLE |
| 3 | zookeeper.console.threshold=WARN |
| 4 | zookeeper.log.dir=. |
| 5 | zookeeper.log.file=zookeeper.log |
| 6 | zookeeper.log.threshold=WARN |
| 7 | zookeeper.tracelog.dir=. |
| 8 | zookeeper.tracelog.file=zookeeper_trace.log |
| 9 | |
| 10 | log4j.logger.edu.uci.ics=INFO |
| 11 | |
| 12 | # |
| 13 | # ZooKeeper Logging Configuration |
| 14 | # |
| 15 | |
| 16 | # Format is "<default threshold> (, <appender>)+ |
| 17 | |
| 18 | # DEFAULT: console appender only |
| 19 | log4j.rootLogger=WARN |
| 20 | |
| 21 | # Example with rolling log file |
| 22 | #log4j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE |
| 23 | |
| 24 | # Example with rolling log file and tracing |
| 25 | #log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE |
| 26 | |
| 27 | # |
| 28 | # Log INFO level and above messages to the console |
| 29 | # |
| 30 | log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender |
| 31 | log4j.appender.CONSOLE.Threshold=${zookeeper.console.threshold} |
| 32 | log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout |
| 33 | log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n |
| 34 | |
| 35 | # |
| 36 | # Add ROLLINGFILE to rootLogger to get log file output |
| 37 | # Log DEBUG level and above messages to a log file |
| 38 | log4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender |
| 39 | log4j.appender.ROLLINGFILE.Threshold=${zookeeper.log.threshold} |
| 40 | log4j.appender.ROLLINGFILE.File=${zookeeper.log.dir}/${zookeeper.log.file} |
| 41 | |
| 42 | # Max log file size of 10MB |
| 43 | log4j.appender.ROLLINGFILE.MaxFileSize=10MB |
| 44 | # uncomment the next line to limit number of backup files |
| 45 | #log4j.appender.ROLLINGFILE.MaxBackupIndex=10 |
| 46 | |
| 47 | log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout |
| 48 | log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n |
| 49 | |
| 50 | |
| 51 | # |
| 52 | # Add TRACEFILE to rootLogger to get log file output |
| 53 | # Log DEBUG level and above messages to a log file |
| 54 | log4j.appender.TRACEFILE=org.apache.log4j.FileAppender |
| 55 | log4j.appender.TRACEFILE.Threshold=TRACE |
| 56 | log4j.appender.TRACEFILE.File=${zookeeper.tracelog.dir}/${zookeeper.tracelog.file} |
| 57 | |
| 58 | log4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout |
| 59 | ### Notice we are including log4j's NDC here (%x) |
| 60 | log4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L][%x] - %m%n |