You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by he...@apache.org on 2012/03/30 03:01:36 UTC

svn commit: r1307190 - in /zookeeper/trunk: CHANGES.txt conf/log4j.properties

Author: henry
Date: Fri Mar 30 01:01:35 2012
New Revision: 1307190

URL: http://svn.apache.org/viewvc?rev=1307190&view=rev
Log:
cap space usage of default log4j rolling policy (phunt via henryr)

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=1307190&r1=1307189&r2=1307190&view=diff
==============================================================================
--- zookeeper/trunk/CHANGES.txt (original)
+++ zookeeper/trunk/CHANGES.txt Fri Mar 30 01:01:35 2012
@@ -267,6 +267,7 @@ IMPROVEMENTS:
   ZOOKEEPER-271. Better command line parsing in ZookeeperMain.
   (Hartmut Lang via phunt)
 
+  ZOOKEEPER-1435. cap space usage of default log4j rolling policy (phunt via henryr)
 
 Release 3.4.0 - 
 

Modified: zookeeper/trunk/conf/log4j.properties
URL: http://svn.apache.org/viewvc/zookeeper/trunk/conf/log4j.properties?rev=1307190&r1=1307189&r2=1307190&view=diff
==============================================================================
--- zookeeper/trunk/conf/log4j.properties (original)
+++ zookeeper/trunk/conf/log4j.properties Fri Mar 30 01:01:35 2012
@@ -1,29 +1,40 @@
+# Copyright 2012 The Apache Software Foundation
+# 
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 # 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.log.threshold=INFO
+zookeeper.log.maxfilesize=256MB
+zookeeper.log.maxbackupindex=20
+
 zookeeper.tracelog.dir=.
 zookeeper.tracelog.file=zookeeper_trace.log
 
-#
-# ZooKeeper Logging Configuration
-#
-
-# Format is "<default threshold> (, <appender>)+
-
-# DEFAULT: console appender only
 log4j.rootLogger=${zookeeper.root.logger}
 
-# Example with rolling log file
-#log4j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE
-
-# Example with rolling log file and tracing
-#log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE
-
 #
-# Log INFO level and above messages to the console
+# console
+# Add "console" to rootlogger above if you want to use this 
 #
 log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
 log4j.appender.CONSOLE.Threshold=${zookeeper.console.threshold}
@@ -32,23 +43,19 @@ 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=${zookeeper.log.threshold}
 log4j.appender.ROLLINGFILE.File=${zookeeper.log.dir}/${zookeeper.log.file}
-
-# Max log file size of 10MB
-log4j.appender.ROLLINGFILE.MaxFileSize=10MB
-# uncomment the next line to limit number of backup files
-#log4j.appender.ROLLINGFILE.MaxBackupIndex=10
-
+log4j.appender.ROLLINGFILE.MaxFileSize=${zookeeper.log.maxfilesize}
+log4j.appender.ROLLINGFILE.MaxBackupIndex=${zookeeper.log.maxbackupindex}
 log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout
 log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n
 
-
 #
 # Add TRACEFILE to rootLogger to get log file output
-#    Log DEBUG level and above messages to a log file
+#    Log TRACE 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.tracelog.dir}/${zookeeper.tracelog.file}