logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nandan S <nandan.shantha...@hp.com>
Subject how to retain values using configureAndWatch()
Date Fri, 21 Feb 2014 03:19:57 GMT
Hi,
   i use DOMConfigurator::configureAndWatch(configFile,delay) method to
check for any configuration changes and reload the configuration. But facing
the following issue 

   after calling configurationAndWatch(), i use the
appender->setFile(logFileNameL); appender->activateOptions(p); to change the
file name to which the log messages will be appended. Later, if i change
anything in configFile, configuration file is reloaded and messages will be
logged to file specified in configuration file where in i want to log
messages to be logged to logFileNameL set programtically.

   Is there anyway  the values set in program can be retained after
reloading the configuration file by configureAndWatch() method.

  to make it more specific
  in configuration file 
   

   in application, i set 
   appender->setFile("c:\temp\testApp_logFile.log");

   later in configuration file, i change the threshold level, so
configureAndWatch() method will reload the configuration file and starts
logging to "c:\temp\logFile.log". wherein i want to continue logging to
"c:\temp\testApp_logFile.log" with changed logging level.

   Is it possible to achieve this ? if yes, do let me know more details.

   Thanks in advance.

Regards,
Nandan



--
View this message in context: http://apache-logging.6191.n7.nabble.com/how-to-retain-values-using-configureAndWatch-tp44700.html
Sent from the Log4cxx - Users mailing list archive at Nabble.com.

Mime
View raw message