FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Java

 
 
LinkBack Thread Tools
 
Old 02-15-2010, 09:35 AM
Thomas Koch
 
Default log4j and logrotate

Hi,

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 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
 
Old 02-15-2010, 01:10 PM
Matthew Johnson
 
Default 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
 
Old 02-15-2010, 04:23 PM
tony mancill
 
Default 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/

iEYEARECAAYFAkt5gxEACgkQpdwBkPlyvgPjNgCcD4mS7xhqcu LEUqu9uF6/4mKb
D8YAn3eHbps1GGllF2DK8kIfjQOS7z9t
=BE1n
-----END PGP SIGNATURE-----


--
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
 
Old 02-15-2010, 05:37 PM
Thomas Koch
 
Default 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
 

Thread Tools




All times are GMT. The time now is 05:29 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org