tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: LocalFileHandler archive function
Date Thu, 09 Jun 2016 13:43:09 GMT
Yes it does, you can check
https://github.com/apache/tomee/blob/master/tomee/tomee-juli/src/main/java/org/apache/tomee/jul/handler/rotating/LocalFileHandler.java#L455
to see what happens

PS: can you confirm you use tomee 7 and not 1.7?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-06-09 15:15 GMT+02:00 Rene Cimerlajt <rene.cimerlajt@gmail.com>:

> I have already seen the test, there I found the properties.
>
> With the current settings:
>  1catalina.org.apache.tomee.jul.handler.rotating.LocalFileHandler.
> filenamePattern
> = ${catalina.base}/logs/catalina.%s.%d.log
> 1catalina.org.apache.tomee.jul.handler.rotating.LocalFileHandler.
> archiveDirectory
> = ${catalina.base}/logs/archives
> 1catalina.org.apache.tomee.jul.handler.rotating.
> LocalFileHandler.archiveFormat
> = gzip
> 1catalina.org.apache.tomee.jul.handler.rotating.LocalFileHandler.limit = 10
> kilobytes
> 1catalina.org.apache.tomee.jul.handler.rotating.LocalFileHandler.
> archiveOlderThan
> = 1s #for tesintg
> 1catalina.org.apache.tomee.jul.handler.rotating.LocalFileHandler.
> purgeOlderThan
> = 2s #for tesintg
> 1catalina.org.apache.tomee.jul.handler.rotating.LocalFileHandler.
> dateCheckInterval
> = 1 second
> 1catalina.org.apache.tomee.jul.handler.rotating.LocalFileHandler.
> compressionLevel
> = 1
>
> Would'n some archiving happen after a few seconds of Tomee boot up.. I am
> seeing log rotation every 10k, bo no archiving.
>
> BR
> Rene
>
> 2016-06-09 14:11 GMT+02:00 Romain Manni-Bucau <rmannibucau@gmail.com>:
>
> > *for testing* you can add dateCheckInterval=1 second
> >
> > check
> >
> >
> https://github.com/apache/tomee/blob/master/tomee/tomee-juli/src/test/java/org/apache/tomee/jul/handler/rotating/LocalFileHandlerTest.java#L63
> > for a raw config (prefix is removed in this test)
> >
> > default is 5s which means nothing will happen until you hit these log 5s
> > after first logging statement.
> >
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > <http://www.tomitribe.com> | JavaEE Factory
> > <https://javaeefactory-rmannibucau.rhcloud.com>
> >
> > 2016-06-09 14:06 GMT+02:00 Rene Cimerlajt <rene.cimerlajt@gmail.com>:
> >
> > > HI All.
> > >
> > > I found LocalFileHandler and I am trying to make it working. Rotation
> > works
> > > but do not know how to make the archive function also work.
> > >
> > > Can anyone tell me what I am doing wrong.  The low parameters are for
> > > testing.
> > >
> > >
> > >
> >
> 1catalina.org.apache.tomee.jul.handler.rotating.LocalFileHandler.filenamePattern
> > > = ${catalina.base}/logs/catalina.%s.%d.log
> > >
> > >
> >
> 1catalina.org.apache.tomee.jul.handler.rotating.LocalFileHandler.archiveDirectory
> > > = ${catalina.base}/logs/archives
> > >
> > >
> >
> 1catalina.org.apache.tomee.jul.handler.rotating.LocalFileHandler.archiveFormat
> > > = gzip
> > > 1catalina.org.apache.tomee.jul.handler.rotating.LocalFileHandler.limit
> =
> > 10
> > > kilobytes
> > >
> > >
> >
> 1catalina.org.apache.tomee.jul.handler.rotating.LocalFileHandler.archiveOlderThan
> > > = 1s #for tesintg
> > >
> > >
> >
> 1catalina.org.apache.tomee.jul.handler.rotating.LocalFileHandler.purgeOlderThan
> > > = 2s #for tesintg
> > >
> > >
> >
> 1catalina.org.apache.tomee.jul.handler.rotating.LocalFileHandler.dateCheckInterval
> > > = 1 second
> > >
> > >
> >
> 1catalina.org.apache.tomee.jul.handler.rotating.LocalFileHandler.compressionLevel
> > > = 1
> > >
> > >
> > > I am using 1.7.3.
> > >
> > > BR
> > > Rene
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message