You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by peter ellis <pe...@googlemail.com> on 2007/01/19 10:25:43 UTC

changing logging level at run time

hi guys
is it possible to change my logging level post runtime (while my
application is currently running) such that i can switch between info
and debug ?

note: I use log4j in my code for all logging

thanks

-- 
Peter Ellis
Developer

Re: changing logging level at run time

Posted by Niklas Therning <ni...@trillian.se>.
peter ellis wrote:
> hi guys
> is it possible to change my logging level post runtime (while my
> application is currently running) such that i can switch between info
> and debug ?
>
> note: I use log4j in my code for all logging
>
> thanks
>
If you are loading a log4j properties file yourself you should have a
look at the configureAndWatch() methods in PropertyConfigurator:

http://logging.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurator.html

There's probably something similar if you are using XML configuration
instead.

-- 
Niklas Therning
www.spamdrain.net