commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Cohen <sco...@javactivity.org>
Subject Re: [daemon] How to achieve log rotation of jsvc outside of Tomcat
Date Tue, 21 Oct 2008 14:41:27 GMT
Simon Kitching wrote:
> Steve Cohen schrieb:
>   
>> I am using jsvc to run a non-Tomcat java application as a daemon.
>>
>> I would like to achieve rotation of the system.out and system.err
>> logs.  This is running on a Linux system, but I am by no means a Linux
>> guru and when I see information like "support proper log rotation
>> using SIGUSR1" I don't know what that means.
>>
>> Can someone provide a pointer to a more basic explanation for how to
>> keep these logs rotated?
>>     
> I'm not a commons-daemon developer, but took a quick look anyway.
>
> I guess your comment about "rotation using SIGUSR1" is referring to this
> jira issue:
>   http://issues.apache.org/jira/browse/DAEMON-95
>
> That issue is still open, so as far as I can see jsvc does NOT support
> this.
>
> I can't see any other hint that jsvc supports log rotation, other than
> stopping and restarting the service.
>
> Note that a well-designed java app should not be writing much to stdout
> or stderr, so log rotation for that shouldn't be all that important. If
> you are getting lots of logging output, maybe the logging configuration
> for the application itself is misconfigured? Most java apps use either
> log4j, logback or java.util.logging's default loggers to write messages
> and those can all be configured in various ways.
>
> Regards,
> Simon
>
>   
I am using log4j.  Perhaps I need to turn off stdout logging.  But there 
are still other things being written by support libraries that I've 
never been able to figure out how to direct into log4j - Most notably 
Hibernate, which logs the SQL to stdout and not to the log4j logs.  If I 
could figure that out, this would get much less acute.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message