Hi,
Log::Log4perl follows the singleton pattern. There is always one instance of that class representing the logging facility. With init you initialize it. So, the second init just does what you see, it overwrites the first initialisation. What you want is to add an appender to the initially created object. Therefore you have to look at the runtime methods provides to do that. Have a look at Log::Log4perl::FAQ which gives very much hints how to do it.
UPDATE: Have a look at http://search.cpan.org/~mschilli/Log-Log4perl-1.42/lib/Log/Log4perl.pm#Advanced_configuration_within_Perl
McA
In reply to Re: Log4Perl across modules
by McA
in thread Log4Perl across modules
by rbala
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |