You may want to look into LogWeb
(http://www.codeczar.com/products/logweb/index.html) to see if that
meets your needs or gives you clues.

On 7/12/06, Sharma, Siddharth <[EMAIL PROTECTED]> wrote:
Greetings

In log4j.xml, we have set the threshold to be 'INFO'.
We have written a servlet that takes the log level as a parameter and
dynamically changes log4j's log level.
This is to facilitate bumping the log level up on-demand when an exception
occurs to capture more information.

Here is the code:
LoggerRepository logRepository = LogManager.getLoggerRepository();
logRepository.setThreshold(someLogLevel);


But I find that the log4j does not get configured at runtime to log at a
level lower than what is defined in log4j.xml.
In other words, I can successfully change to WARN, ERROR or FATAL and then
back down to INFO, but I cannot change it to DEBUG (since log4j.xml has
INFO).

I am hoping this is possible to do and will appreciate the code that will
achieve this.
I can certainly change log4j.xml to have a threshold of DEBUG and then
programmatically change it to INFO during server startup. But I'd rather not
do it that way since it is a HACK!

Thanks in advance
Sid




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to