diff options
author | Martin Ritchie <ritchiem@apache.org> | 2009-12-16 17:21:20 +0000 |
---|---|---|
committer | Martin Ritchie <ritchiem@apache.org> | 2009-12-16 17:21:20 +0000 |
commit | a995eb0e978e59420006027efb59f77284827939 (patch) | |
tree | 8f06b0ffc86fc10c002d609d1b94c78dfc2d968d | |
parent | 29cedd0cef08348c9e8d52a9d48168e74a139840 (diff) | |
download | qpid-python-a995eb0e978e59420006027efb59f77284827939.tar.gz |
QPID-2155 : Updated log4j file with more sensible default values for the QpidRollingFileAppender appender.
Also added more local documentation explaining the more obscure params
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@891332 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | java/broker/etc/log4j.xml | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/java/broker/etc/log4j.xml b/java/broker/etc/log4j.xml index 484b203df8..d5c3537cc9 100644 --- a/java/broker/etc/log4j.xml +++ b/java/broker/etc/log4j.xml @@ -22,30 +22,43 @@ <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="null" threshold="null"> <appender class="org.apache.log4j.QpidCompositeRollingAppender" name="ArchivingFileAppender"> - <!-- Ensure that logs allways have the dateFormat set--> - <param name="StaticLogFileName" value="false"/> - <param name="File" value="${QPID_WORK}/log/${logprefix}qpid${logsuffix}.log"/> - <param name="Append" value="false"/> + <!-- Ensure that logs allways have the dateFormat set Default: TRUE--> + <param name="StaticLogFileName" value="true"/> + <param name="file" value="${QPID_WORK}/log/${logprefix}qpid${logsuffix}.log"/> + <!-- Style of rolling to use, by: + File Size (1), + Date(2), + Both(3) - DEFAULT + When Date (or Both) is enabled then the value of DatePattern will determine + when the new file is made. e.g. a DatePattern of "'.'yyyy-MM-dd-HH-mm" + which includes minutes will cause a new backup file to be made every minute. + --> + <param name="RollingStyle" value="1"/> <!-- 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"/> - <!-- Use default 10MB --> - <!--param name="MaxFileSize" value="100000"/--> + <!-- + negative means backups become <latest>,.0,.1,2,...,n + 0 means backup name is date stampted and follow Positive number if DataPattern clashes. + Positive means backup becomes <lastest,n,n-1,n-2,..0 + + Default is negative. + --> + <param name="CountDirection" value="0"/> + <!-- Use default 1MB --> + <param name="MaxFileSize" value="1MB"/> <param name="DatePattern" value="'.'yyyy-MM-dd-HH-mm"/> - <!-- Unlimited number of backups --> + <!-- Unlimited number of backups : Default: 0, no backups, -1 infinite --> <param name="MaxSizeRollBackups" value="-1"/> - <!-- Compress(gzip) the backup files--> + <!-- Compress(gzip) the backup files default:FALSE--> <param name="CompressBackupFiles" value="true"/> - <!-- Compress the backup files using a second thread --> + <!-- Compress the backup files using a second thread DEFAULT: FALSE--> <param name="CompressAsync" value="true"/> - <!-- Start at zero numbered files--> - <param name="ZeroBased" value="true"/> - <!-- Backup Location --> - <param name="backupFilesToPath" value="${QPID_WORK}/backup/log"/> + <!-- Backup Location : Default same dir as log file --> + <param name="backupFilesToPath" value="${QPID_WORK}/backup/log"/> + <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> - </layout> + </layout>` </appender> <appender class="org.apache.log4j.FileAppender" name="FileAppender"> |