Subject: | Die with warning on duplicate entries in configuration |
Linux 2.4.21-27.0.2.EL i686 i386 GNU/Linux
This is perl, v5.8.0 built for i386-linux-thread-multi
Module id = Log::Log4perl INST_VERSION 0.51
Subject: Die with warning on duplicate entries in configuration
Duplicate entries in configuration will leed to errors messages which
are hard to interpret:
level 'ARRAY(0x8b307fc)' is not a valid error level
(DEBUG|INFO|WARN|ERROR|FATAL|ALL|OFF) at
/usr/lib/perl5/site_perl/5.8.0/Log/Log4perl/Config.pm line 258
I suggest adding the attached patch to Log/Log4perl/Config.pm in order
to give the user a better hint of what went wrong.
Multiple definition of Foo Bar at
/usr/lib/perl5/site_perl/5.8.0/Log/Log4perl/Config.pm line 191.
Test script which produces the output shown above:
#!/usr/bin/perl
use Log::Log4perl;
my $conf = q(
log4perl.logger.Foo.Bar = INFO, Screen
log4perl.logger.Foo.Bar = INFO, Screen
);
Log::Log4perl::init( \$conf );
__END__
Best regards,
Ola Finsbraaten
--
189a190,192
> if (ref($value) eq "ARRAY") {
> die "Multiple definition of @$path";
> }