summaryrefslogtreecommitdiff
path: root/java/broker/etc/log4j.xml
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2007-03-21 16:26:03 +0000
committerMartin Ritchie <ritchiem@apache.org>2007-03-21 16:26:03 +0000
commitf549e266843833be5892e9feb264ac12cf7690d5 (patch)
treeadca467159ef0dde0befb4c0cdf5c871643be65f /java/broker/etc/log4j.xml
parent06069e606b0121a8c5f0bcf220421a03e56e4213 (diff)
downloadqpid-python-f549e266843833be5892e9feb264ac12cf7690d5.tar.gz
Added a new Appender from the Log4j contrib code base as QpidCompositeRollingAppender. This will allow us to roll the broker log files on a set time frame AND to a maximum file size. The CompositeRollingAppender was contributed by Kevin Steppe to the log4j project but as it is not part of the log4j.jar we must include it in our own code base until log4j provide a core implementation.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2@520938 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker/etc/log4j.xml')
-rw-r--r--java/broker/etc/log4j.xml10
1 files changed, 9 insertions, 1 deletions
diff --git a/java/broker/etc/log4j.xml b/java/broker/etc/log4j.xml
index 0cf2579137..e0c4aa98e8 100644
--- a/java/broker/etc/log4j.xml
+++ b/java/broker/etc/log4j.xml
@@ -21,9 +21,17 @@
-->
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
- <appender name="FileAppender" class="org.apache.log4j.FileAppender">
+ <appender name="FileAppender" class="org.apache.log4j.QpidCompositeRollingAppender">
+ <param name="staticLogFileName" value="false"/>
<param name="File" value="${QPID_WORK}/log/${logprefix}qpid${logsuffix}.log"/>
<param name="Append" value="false"/>
+ <!-- Change the direction so newer files have bigger numbers -->
+ <!-- So log.1 is written then log.2 etc This prevents a lot of file renames at log rollover -->
+ <param name="CountDirection" value="1"/>
+ <!--param name="MaxFileSize" value="1000"/ Use default 10MB -->
+ <param name="DatePattern" value="'.'yyyy-MM-dd-HH-mm"/>
+ <!-- Unlimited number of backups -->
+ <param name="MaxSizeRollBackups" value="-1"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%t %-5p %c{2} - %m%n"/>