From: William M. <wi...@kn...> - 2003-09-25 01:15:34
|
On Wed, Sep 24, 2003 at 05:04:20PM -0700, Kevin Goess wrote: > William, if I'm understanding you correctly, you're calling Log4perl's > init() function inside a subroutine, and calling it repeatedly? > Log4perl works from singleton objects that are global to the entire > interpreter (package globals), so each perl interpreter only needs to > call init() once in its lifetime. Subsequent calls to > get_logger('somecategory') retrieve the same loggers from the hoard of > singletons. > > Does that make sense? Yep. It's the persistant environment that's causing some confusion for me. I'm following the first example from your article (great job btw!) at Perl.com. I've revised my subroutine to test for an existing logger before calling init again. William -- Knowmad Services Inc. http://www.knowmad.com |