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

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel

Reply via email to