I wasn't aware that Java doesn't provide any API to modify ZIP archives, that's 
a shake :-(
Do you think it would be doable if the request would be to create the zip 
archive once at the time the archive should roll. I guess the concept of 
rolling should be twofold - the log files roll independently of the archives 
and the archives roll every n archive rolls. The moment the archive rolls all 
logs should be archived. 
In case of %d{yyyy-MM-dd}.%i.zip pattern on every change of %i the next log 
would be created (no archiving happens at this time) and on the change of the 
date the rolling should happen as usual but also all the %i logs created on the 
previous date should be archived. 
Do you think I can create a ticket for such a feature?

Regards,
Tom

David Roussel <[email protected]> wrote:

>No that is not supported. 
>
>Note that there are no java APIs (that I know of) for modifying a zip file. 
>The only way to add a file to an existing zip file is to create a new zip file 
>with the file added and then delete the old zip file. 
>
>David
>
>> On 1 Oct 2013, at 09:57, PaSik <[email protected]> wrote:
>> 
>> Hi,
>> 
>> Could you please tell me whether it's possible to configure logback in such 
>> a way that multiple log files are compressed to a single, possibly already 
>> existing archive (existing because logback itself has already put some log 
>> Giles in this archive).
>> 
>> The current use case is that I'd like to have a RollingFileAppender with 
>> SizeAndTimeBasedFNATP with fileNamePattern=mylog-%d{yyyy-MM-dd}.%i.zip and 
>> have the log files archived to mylog-%d{yyyy-MM-dd}.zip.
>> 
>> Another use case would be an app that doesn't produce much logs and the loga 
>> would be produced to daily files but the archives would be monthly.
>> 
>> Thanks,
>> Tom
>> _______________________________________________
>> Logback-user mailing list
>> [email protected]
>> http://mailman.qos.ch/mailman/listinfo/logback-user
>_______________________________________________
>Logback-user mailing list
>[email protected]
>http://mailman.qos.ch/mailman/listinfo/logback-user
_______________________________________________
Logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user

Reply via email to