[logback-user] RollingFileAppender with compress & %i

DeepakVadgama vadgama.deepak at gmail.com
Wed Mar 2 04:43:54 CET 2011


FixedWindowRollingPolicy with compress and %i, always zips the active log
file and renames the zip

Thus The log files inside all the resulting zips has same log filename.

How do i ensure the log file is renamed with %i before zipping it up? 

Eg: FileNamePattern of MyLogFile%i.log.zip

currently results in 
MyLogFile1.log.zip (with log file name MyLogFile.log)
MyLogFile2.log.zip (with log file name MyLogFile.log)
MyLogFile3.log.zip (with log file name MyLogFile.log)

I want it to be
MyLogFile1.log.zip (with log file name MyLogFile1.log)
MyLogFile2.log.zip (with log file name MyLogFile2.log)
MyLogFile3.log.zip (with log file name MyLogFile3.log)
-- 
View this message in context: http://old.nabble.com/RollingFileAppender-with-compress----i-tp31037552p31037552.html
Sent from the Logback User mailing list archive at Nabble.com.



More information about the Logback-user mailing list