[logback-user] FileAppender gzip

Nikolas Everett nik9000 at gmail.com
Wed Jul 22 15:05:35 CEST 2009


If you do go the gzip on output route then watch out for
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4691425 .  It basically
means that Java can't read gzip files that it built in an append style or
that someone built like this:
gzip * > ~/dir_dump.gz

--Nik

On Wed, Jul 22, 2009 at 8:56 AM, Franck Routier <franck.routier at axege.com>wrote:

> Thanks for your quick answer.
>
> Maybe I'll rather gzip my file once the appender is closed then...
>
> Franck
>
>
> Le mercredi 22 juillet 2009 à 13:19 +0200, Chad La Joie a écrit :
> > The file appender only offers compression support when the log files are
> > rotated.  I think you'll have to extend the appender if you want to
> > compress while you write.  However, this could be dangerous as the
> > appender may be closed out unexpectedly (e.g. if the VM is killed or
> > stopped) which would could leave you with a corrupted archive.
> >
> > Franck Routier wrote:
> > > Hi all,
> > >
> > > I am programatically creating and using a FileAppender.
> > > I would like it to gzip on the fly the resulting File. Is there a way
> to
> > > do this, or do I have to extend and implement it by myself ?
> > >
> > > Franck
> > >
> > >
> > >
> > > _______________________________________________
> > > Logback-user mailing list
> > > Logback-user at qos.ch
> > > http://qos.ch/mailman/listinfo/logback-user
> >
>
>
>
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20090722/998b7386/attachment.htm>


More information about the Logback-user mailing list