Close
jGuru Forums
Posted By: Ashish_Sharma Posted On: Wednesday, May 14, 2003 09:45 PM
How do i change log4j log level while program is running.In properties file Current log level is WARN,while program is running if i change it to DEBUG, it doesnt log debug messages I would appreciate quick response cheers ashish
Re: Change of Log Level.
Posted By: m_d Posted On: Wednesday, June 4, 2003 01:41 AM
Sorry for th elate response, I just read your question.
If you use PropertyConfigurator.configureAndWatch(...), your changes to the logfile will be noticed by log4j.
Posted By: Nick_Maiorano Posted On: Sunday, May 18, 2003 06:24 AM
Call the setLevel() method off the Logger class. It would look something like this:Logger logger = Logger.getLogger("myClassName");logger.setLevel(Level.DEBUG);
For more info, click here.