From: Carlos V. <cvi...@ne...> - 2007-06-08 06:14:39
|
Mike Schilli wrote: > Hmm. First off, in your configuration is no appender named > 'updatedevice.html', so appender_by_name will return undef. Even if The intention there was to make sure it wasn't still alive (left off from an unfinished execution of this same code) before calling add_appender again. > 'updatedevice.html' existed and appender_by_name returned an > object, calling undef() on it isn't the right way to get rid of it. > There's a method called eradicate_appender() for that: > > "To eradicate an appender from the system, > you need to call > Log::Log4perl->eradicate_appender($appender_name) > which will first remove the appender from every logger in the system > and then will delete all references Log4perl holds to it." > > Give it a whirl and let me know how it works out! > > -- Mike > Yes. That seems to do the trick. I hadn't seen that method. Thank you! cv |