Problem related to BasicConfigurator.resetConfiguration()
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Raj_Ranganath
Posted On:   Friday, August 12, 2005 03:57 PM

Hi, I have a web application, which uses two different web modules. We use log4j for logging. One module is using log4j properties to configure the log file name, whereas the other is creating the log file name dynamically using the Daily rolling appender. Problem is, in the first web app, we are using BasicConfigurator.resetConfiguration() and configureAndWatch() methods. Because, of the use reset confgiration method, log4j is clearing all the appenders, even from the second web app(as both are running under same jvm). Since the second one creates the file name dynamically, it's appender will be lost and all the messages which should have gone to that logger is now going to the oth   More>>

Hi,
I have a web application, which uses two different web modules.
We use log4j for logging. One module is using log4j properties to configure the log file name, whereas the
other is creating the log file name dynamically using the
Daily rolling appender.


Problem is, in the first web app, we are using BasicConfigurator.resetConfiguration() and configureAndWatch() methods. Because, of the use reset confgiration method, log4j is clearing all the appenders,
even from the second web app(as both are running under same jvm).


Since the second one creates the file name dynamically, it's appender will be lost and all the messages which should have gone to that logger is now going to the other log4j.


Is there any way to avoid this? We need to use the resetConfigration() !!


Any inputs will be highly appreciated.

Thanks and Regards,
Rajesh.

   <<Less
About | Sitemap | Contact