zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r1069169 - in /zookeeper/trunk: CHANGES.txt conf/log4j.properties
Date Wed, 09 Feb 2011 23:41:18 GMT
Author: mahadev
Date: Wed Feb  9 23:41:17 2011
New Revision: 1069169

URL: http://svn.apache.org/viewvc?rev=1069169&view=rev
Log:
ZOOKEEPER-980. allow configuration parameters for log4j.properties (phunt via mahadev)

Modified:
    zookeeper/trunk/CHANGES.txt
    zookeeper/trunk/conf/log4j.properties

Modified: zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/trunk/CHANGES.txt?rev=1069169&r1=1069168&r2=1069169&view=diff
==============================================================================
--- zookeeper/trunk/CHANGES.txt (original)
+++ zookeeper/trunk/CHANGES.txt Wed Feb  9 23:41:17 2011
@@ -236,6 +236,8 @@ IMPROVEMENTS:
 
   ZOOKEEPER-465. Ledger size in bytes. (flavio via mahadev)
 
+  ZOOKEEPER-980. allow configuration parameters for log4j.properties (phunt via mahadev)
+
 NEW FEATURES:
   ZOOKEEPER-729. Java client API to recursively delete a subtree.
   (Kay Kay via henry)

Modified: zookeeper/trunk/conf/log4j.properties
URL: http://svn.apache.org/viewvc/zookeeper/trunk/conf/log4j.properties?rev=1069169&r1=1069168&r2=1069169&view=diff
==============================================================================
--- zookeeper/trunk/conf/log4j.properties (original)
+++ zookeeper/trunk/conf/log4j.properties Wed Feb  9 23:41:17 2011
@@ -1,3 +1,12 @@
+# Define some default values that can be overridden by system properties
+zookeeper.root.logger=INFO, CONSOLE
+zookeeper.console.threshold=INFO
+zookeeper.log.dir=.
+zookeeper.log.file=zookeeper.log
+zookeeper.log.threshold=DEBUG
+zookeeper.tracelog.dir=.
+zookeeper.tracelog.file=zookeeper_trace.log
+
 #
 # ZooKeeper Logging Configuration
 #
@@ -5,7 +14,7 @@
 # Format is "<default threshold> (, <appender>)+
 
 # DEFAULT: console appender only
-log4j.rootLogger=INFO, CONSOLE
+log4j.rootLogger=${zookeeper.root.logger}
 
 # Example with rolling log file
 #log4j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE
@@ -17,7 +26,7 @@ log4j.rootLogger=INFO, CONSOLE
 # Log INFO level and above messages to the console
 #
 log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.Threshold=INFO
+log4j.appender.CONSOLE.Threshold=${zookeeper.console.threshold}
 log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
 log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L]
- %m%n
 
@@ -25,8 +34,8 @@ log4j.appender.CONSOLE.layout.Conversion
 # Add ROLLINGFILE to rootLogger to get log file output
 #    Log DEBUG level and above messages to a log file
 log4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender
-log4j.appender.ROLLINGFILE.Threshold=DEBUG
-log4j.appender.ROLLINGFILE.File=zookeeper.log
+log4j.appender.ROLLINGFILE.Threshold=${zookeeper.log.threshold}
+log4j.appender.ROLLINGFILE.File=${zookeeper.log.dir}/${zookeeper.log.file}
 
 # Max log file size of 10MB
 log4j.appender.ROLLINGFILE.MaxFileSize=10MB
@@ -42,7 +51,7 @@ log4j.appender.ROLLINGFILE.layout.Conver
 #    Log DEBUG level and above messages to a log file
 log4j.appender.TRACEFILE=org.apache.log4j.FileAppender
 log4j.appender.TRACEFILE.Threshold=TRACE
-log4j.appender.TRACEFILE.File=zookeeper_trace.log
+log4j.appender.TRACEFILE.File=${zookeeper.tracelog.dir}/${zookeeper.tracelog.file}
 
 log4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout
 ### Notice we are including log4j's NDC here (%x)



Mime
View raw message