You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Abramson, Rami" <ra...@terayon.com> on 2002/12/19 09:10:28 UTC
Using the CompositeRollingAppender
Hello,
Using the CompositeRollingAppender the following properties file is being
used (an example I found of Ceki Gülcü) :
----------------------------------------------------------------------------
-------------------
#Default Config file for CompositeRollingAppender
log4j.rootCategory=debug, R
log4j.appender.R=org.apache.log4j.CompositeRollingAppender
#How to perform rolling -- Composite is the default
log4j.appender.R.RollingStyle=3
#Use same file name for all inprocess logging?
log4j.appender.R.staticLogFileName=true
log4j.appender.R.File=logs/log4jExample.log
#Size Rolling params
log4j.appender.R.CountDirection=-1
log4j.appender.R.MaxFileSize=2KB
log4j.appender.R.MaxSizeRollBackups=10
#Date Rolling params
log4j.appender.R.datePattern='.'yyyy-MM-dd
#layout options
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
----------------------------------------------------------------------------
-------------------
For some reason 2 things do not work:
1> An error occurs : log4j:WARN Failed to set property [maxFileSize] to
value "2KB".
2> Even if I solve <1> by using the following configuration line:
log4j.appender.R.MaxFileSize=2000
still the file names are "log4jExample.log.1" ...
"log4jExample.log.10" and do not contain the date.
thank you,
Rami A.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>