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 Paramjyot <pa...@gmail.com> on 2012/07/26 19:00:13 UTC

Log4j getting size based rolled file, compressed(*.gz)

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