From: Bart P. <ba...@la...> - 2004-12-09 20:00:40
|
Basically I have a process that logs to a master log file, the screen and email, that I've converting from Log::Dispatch to Log::Log4perl -- and this part works great. I need to add the ability of periodically opening/closing log files in other directories (e.g. like daily logs) where the directories do not necessarily exist when the process (and Log4perl) initializes. (Similar to Log::Dispatch's add and remove methods). Obviously I can use add_appender to open a new log file, but I'm not sure how to remove the appender when I'm finished with it. I couldn't find anything like "remove_appender" though perhaps I'm just missing it. The FAQ seems to indicate that the way to turn off logging is to set the threshold to OFF. Unfortunately, over time, this will leak appenders. Is there a clean way to remove appenders at runtime? Thanks, Bart Parliman |