- use log4j's internal logrotate mechanism
- use debian's logrotate
And if debian's is prefered, how to do it properly, so that log4j won't
complain or continue writing in a just rotated logfile?
If there's a clear preference, I'd propose to put it in java-policy.
Thanks,
Thomas Koch, http://www.koch.ro
--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201002151135.54952.thomas@koch.ro">http://lists.debian.org/201002151135.54952.thomas@koch.ro
02-15-2010, 01:10 PM
Matthew Johnson
log4j and logrotate
On Mon Feb 15 11:35, Thomas Koch wrote:
> what's preferred?
>
> - use log4j's internal logrotate mechanism
> - use debian's logrotate
>
> And if debian's is prefered, how to do it properly, so that log4j won't
> complain or continue writing in a just rotated logfile?
If it's easy to do (not significant upstream patching etc) then I'd favour the
system logrotate. Normally this works by HUPing the program to reopen it's log
files, but I don't know now log4j does this.
Matt
--
Matthew Johnson
02-15-2010, 04:23 PM
tony mancill
log4j and logrotate
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Matthew Johnson wrote:
> On Mon Feb 15 11:35, Thomas Koch wrote:
>> what's preferred?
>>
>> - use log4j's internal logrotate mechanism
>> - use debian's logrotate
>>
>> And if debian's is prefered, how to do it properly, so that log4j won't
>> complain or continue writing in a just rotated logfile?
>
> If it's easy to do (not significant upstream patching etc) then I'd favour the
> system logrotate. Normally this works by HUPing the program to reopen it's log
> files, but I don't know now log4j does this.
Since log4j is a library that can be used any Java app (and not only daemons)
and supports various types of appenders, I'm not sure logrotate will always
applicable. Also, I think the patching to log4j would be non-trivial.
- From the perspective of someone supporting systems that use log4j, I'd say that
it might be disconcerting for users to have both log4j and logrotate managing
the same logfiles.
What's the context of the question? Is this for a specific package, or in
general (for all Debian Java packages)?
Cheers,
Tony
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4B798311.1040507@debian.org">http://lists.debian.org/4B798311.1040507@debian.org
02-15-2010, 05:37 PM
Thomas Koch
log4j and logrotate
> Since log4j is a library that can be used any Java app (and not only
> daemons) and supports various types of appenders, I'm not sure logrotate
> will always applicable. Also, I think the patching to log4j would be
> non-trivial.
>
> From the perspective of someone supporting systems that use log4j, I'd say
> that it might be disconcerting for users to have both log4j and logrotate
> managing the same logfiles.
>
> What's the context of the question? Is this for a specific package, or in
> general (for all Debian Java packages)?
I'm packaging 3 java daemons, which all come with an example log4j.properties
file. I could set up logrotation in this example file or could set up
logrotation in /etc/logrotate.d while log4j continues to write to the same
file (which is rotated in the background).
There are many more java servers in debian which use log4j and there's no
convention yet, how to handle this situation.
Best regards,
Thomas Koch, http://www.koch.ro
--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201002151937.34562.thomas@koch.ro">http://lists.debian.org/201002151937.34562.thomas@koch.ro