logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vivek R. Rathod" <vrat...@appsecinc.com>
Subject RE: programmatic configuration overrides XmlConfigurator.ConfigureAndWatch ?
Date Thu, 15 Jul 2010 14:46:48 GMT
Sorry, may be I posted this too soon, but I do see the log level revert back to the original
value - only I cant make it happen consistently. I looked through the source code and noticed
that there is a 500 msec delay before the config change is processed. May be thats the reason,
but Im not sure. Any confirmation from someone who knows would be very helpful :)
This brings me to another question though - is there a way to stop watching the config file
once  XmlConfigurator.ConfigureAndWatch is called, and later resume watching again?
-Vivek
________________________________________
From: Vivek R. Rathod
Sent: Wednesday, July 14, 2010 5:26 PM
To: log4net-user@logging.apache.org
Subject: programmatic configuration overrides XmlConfigurator.ConfigureAndWatch ?

Hi, I observed that if I configure log4net using XmlConfigurator.ConfigureAndWatch, and then
programmatically change the configuration (change 'root' log level, for example), further
changes to the configuration file (like changing the 'root' log level back to the original
value) does not cause the log level to revert back to the original value  in the code...
For example, when I call XmlConfigurator.ConfigureAndWatch my 'root' log level is 'DEBUG'.
I then change it to 'ERROR' programmtically. But then if I change the log level back to 'DEBUG'
in the config file, in my code the 'root' logger still has the log level of 'ERROR'
Is this the intended behavior or am I missing something?
-Vivek

Mime
View raw message