Subject: | chance to not overwrite another Log::Log4perl |
I configure Log4perl, making some stuff and then starting App::Daemon
... and get a new Logger :-/ So i must reinit my config ...
The patch will check if Log::Log4perl alreay initialized ...
Perhaps this should be configured with a additional variable but i think
if there is a logger, there is not need for a new logger.
Subject: | Daemon.pm.patch |
--- Daemon.pm.orig 2009-03-24 12:09:39.000000000 +0100
+++ Daemon.pm 2009-03-24 12:15:04.000000000 +0100
@@ -71,7 +71,9 @@
$background = 0;
}
- if( $l4p_conf ) {
+ if( Log::Log4perl->initialized() ) {
+ # noting, Logger already there ...
+ } elsif( $l4p_conf ) {
Log::Log4perl->init( $l4p_conf );
} elsif( !$background ) {
Log::Log4perl->easy_init({ level => $loglevel,