You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Oscar Ruiz <os...@gtd.es> on 2003/02/18 10:49:38 UTC

Remote control

Hi all,

is there any way of changing logging properties online?, i.e. without
restarting the application?, and even more, can this be done remotely?

I have a server with multiple java applications, each of them using its own
logging properties file, when a problem ocurrs i need to change the
properties file in order to enable debuging for the application causing the
problems, but obviously restarting changes the whole state of the
application, not helping to debug.

Thanks a lot.


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


Re: Remote control

Posted by Jacob Kjome <ho...@visi.com>.
In addition, check out the ConfigurationServlet in the 
org.apache.log4j.servlet package in log4j-sandbox (CVS only).  I haven't 
tried it yet, but it should provide you with a way to modify your log4j 
settings via the web.

Jake

At 10:55 AM 2/18/2003 +0100, you wrote:
>On Tue, 18 Feb 2003 10:49:38 +0100, Oscar Ruiz wrote:
>
> >Hi all,
> >
> >is there any way of changing logging properties online?, i.e. without
> >restarting the application?, and even more, can this be done remotely?
> >
> >I have a server with multiple java applications, each of them using its own
> >logging properties file, when a problem ocurrs i need to change the
> >properties file in order to enable debuging for the application causing the
> >problems, but obviously restarting changes the whole state of the
> >application, not helping to debug.
>
>Use
>"PropertyConfigurator.configureAndWatch("config/logging.properties");".
>This makes log4j reread the properties file every minute, allowing you
>to update the debug level online.
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

Re: Remote control

Posted by Ferenc Toth <ft...@eu.infobal.com>.
On Tue, 18 Feb 2003 10:49:38 +0100, Oscar Ruiz wrote:

>Hi all,
>
>is there any way of changing logging properties online?, i.e. without
>restarting the application?, and even more, can this be done remotely?
>
>I have a server with multiple java applications, each of them using its own
>logging properties file, when a problem ocurrs i need to change the
>properties file in order to enable debuging for the application causing the
>problems, but obviously restarting changes the whole state of the
>application, not helping to debug.

Use
"PropertyConfigurator.configureAndWatch("config/logging.properties");".
This makes log4j reread the properties file every minute, allowing you
to update the debug level online. 




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