logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paramjyot <paramjyotsi...@gmail.com>
Subject Log4j getting size based rolled file, compressed(*.gz)
Date Thu, 26 Jul 2012 17:00:13 GMT

I am trying to get rolled log file in compressed format but it is not working
with size based rolling policy

log4j configuration i am using is :

log4j.appender.myappLogger=org.apache.log4j.RollingFileAppender
log4j.appender.myappLogger.File=${log_dir}/myapp.log
log4j.appender.myappLogger.MaxFileSize=5MB
log4j.appender.myappLogger.RollingPolicy.FileNamePattern=myapp.%d{yyyy-MM-dd-HH}.log.gz
log4j.appender.myappLogger.layout=org.apache.log4j.PatternLayout
log4j.appender.myappLogger.layout.ConversionPattern=%d %r [%t] %5p %c %x ¬
%m%n

Any suggestions how to achieve this.
-- 
View this message in context: http://old.nabble.com/Log4j-getting-size-based-rolled-file%2C-compressed%28*.gz%29-tp34216615p34216615.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message