Why don't you just use the DOMConfigurator and use the configureAndWatch()
method to initialize log4j. Then you can change the config file dynamically
at
runtime and have it take effect. This is probably the best (& easiest) way
to use
log4j when you want dynamic logging changes at runtime.
-Scott
Naveen Bathula
<nbatula@intel To: Log4J Users List
<[EMAIL PROTECTED]>
idata.com> cc:
Subject: Runtime Enable/Disable Logging
03/13/2002
11:55 AM
Please respond
to "Log4J
Users List"
I am using log4j-1.2beta3
I set the Logging Level to be "FATAL"
LogManager.getLoggerRepository().setThreshold(XLevel.FATAL);
in the code.
I came across a mailing list where we can overide the Level with out
changing the binary at the client site using the command at run time
java ..... -D log4j.disableOverride=true (I set this during run time)
This Level is set to debug in the configuration
<priority value ="debug" />
<appender-ref ref="CONSOLE"/>
But I don't see all my debug messages....
Am I doing something wrong.....
How can we overide the threshold Level set in the binary code during rin
time?
Thanks
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>