From: Mike S. <m...@pe...> - 2004-03-25 19:24:37
|
Lee Carmichael wrote on 3/25/2004, 8:42 AM: > I am trying to update a logfile from the configuration > file at run time. I would really like to get the > current appender then alter the logfile name with out > completly creating a new appender. I want to use the > configuration file so that ops people can control most > of the behavior of the app. Is this possible? Am I > being clear? If you're loading the config file with init_and_watch(), you could simply adapt the file appender's logfile setting in the config file and have L4P reload the configuration, either via polling or a signal. Make sure you're using autoflush, though, otherwise you might lose messages not flushed yet at re-init time. Another way of accomplishing the same thing would be adding a signal handler to your application, and using the switch_file method of the file appender, take the test case in t/026FileApp.t as an example. -- -- Mike Mike Schilli m...@pe... |