RollingFileAppender with compress & %i

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-tp31037552p3103... Sent from the Logback User mailing list archive at Nabble.com.

Hello Deepak, Please create a bug report so that this problem can be fixed. -- Ceki On 02.03.2011 04:43, DeepakVadgama wrote:
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)

Thank you for the quick reply Ceki. I have raised the JIRA as you requested. http://jira.qos.ch/browse/LBCORE-199 Ceki Gulcu wrote:
Hello Deepak,
Please create a bug report so that this problem can be fixed. -- Ceki
On 02.03.2011 04:43, DeepakVadgama wrote:
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)
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
-- View this message in context: http://old.nabble.com/RollingFileAppender-with-compress----i-tp31037552p3104... Sent from the Logback User mailing list archive at Nabble.com.

I have commented on this (working with Deepak), what we would like to achieve is to be able to unzip a bunch of rolled up logs in one directory and not having them overwriting each other due to the use of same name inside the jar. Unless i am mistaken, the rolling zip appender does rename all files when it is rolling over. This would make it unsuitable to rename the files inside the zips. So, is there a mechanism to add a timestamp (or any unique code) to the filenames inside the jars at the time of the creation of the zip? Many thanks Benoît On Wednesday, 2 March 2011, DeepakVadgama <vadgama.deepak@gmail.com> wrote:
I have raised the JIRA as you requested.
http://jira.qos.ch/browse/LBCORE-199
Ceki Gulcu wrote:
Hello Deepak,
Please create a bug report so that this problem can be fixed. -- Ceki
On 02.03.2011 04:43, DeepakVadgama wrote:
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)
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
-- View this message in context: http://old.nabble.com/RollingFileAppender-with-compress----i-tp31037552p3104... Sent from the Logback User mailing list archive at Nabble.com.
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
-- IMPORTANT NOTICE This communication contains information that is considered confidential and may also be privileged . It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender and delete the original.

Just use .gz that will solve your problem. When you unzip a gz file the file name is the same but with the .gz removed. Also you can open .log.gz files in vim with out unzipping them first. In fact quite a few unix tools, grep, less, etc, can process .gz files as if they were not zipped. David On 3 Mar 2011, at 08:23, Benoit Xhenseval <bx@appendium.com> wrote:
I have commented on this (working with Deepak), what we would like to achieve is to be able to unzip a bunch of rolled up logs in one directory and not having them overwriting each other due to the use of same name inside the jar.
Unless i am mistaken, the rolling zip appender does rename all files when it is rolling over. This would make it unsuitable to rename the files inside the zips.
So, is there a mechanism to add a timestamp (or any unique code) to the filenames inside the jars at the time of the creation of the zip?
Many thanks
Benoît
On Wednesday, 2 March 2011, DeepakVadgama <vadgama.deepak@gmail.com> wrote:
I have raised the JIRA as you requested.
http://jira.qos.ch/browse/LBCORE-199
Ceki Gulcu wrote:
Hello Deepak,
Please create a bug report so that this problem can be fixed. -- Ceki
On 02.03.2011 04:43, DeepakVadgama wrote:
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)
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
-- View this message in context: http://old.nabble.com/RollingFileAppender-with-compress----i-tp31037552p3104... Sent from the Logback User mailing list archive at Nabble.com.
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
-- IMPORTANT NOTICE This communication contains information that is considered confidential and may also be privileged . It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender and delete the original. _______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
participants (4)
-
Benoit Xhenseval
-
Ceki Gulcu
-
David Roussel
-
DeepakVadgama