Actually this gives me an idea for a future feature. What if we made it so changing settings while a configureAndWatch is active updated the settings file itself? We could make it an option to configureAndWatch. Anybody else like that idea? Should I open a feature request in Jira?
On Feb 20, 2014, at 9:18 PM, Nandan S <nandan.shantha...@hp.com> wrote: > 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/configureandwatch-clears-the-setting-tp44699.html > Sent from the Log4cxx - Dev mailing list archive at Nabble.com. > Joseph Southwell jos...@southwell.org The past is history, The future's a mystery, The present's a gift.
signature.asc
Description: Message signed with OpenPGP using GPGMail