Hi, I'm starting using Log4perl, and get warning about uninitialized value
in Appender code.

I think this change my program output when activate Log4perl, here is a
example:

*$ cat t.pl*
use Log::Log4perl qw(:easy);

Log::Log4perl->easy_init($ERROR);

my $a;

ERROR($a);

*$ perl t.pl*
Use of uninitialized value in join or string at Log/Log4perl/Appender.pm
line 167.
2011/10/16 20:49:01

Line 167 of Appender say:

165             $p->{message} =
166                 join($Log::Log4perl::JOIN_MSG_ARRAY_CHAR,
167                      @{$p->{message}}
168                      ) if ref $p->{message} eq "ARRAY";


and I think this could be fixed modifying like this :

165             $p->{message} =
166                 join($Log::Log4perl::JOIN_MSG_ARRAY_CHAR,
167                      map { defined $_ ? $_ : 'undef' } @{$p->{message}}
168                      ) if ref $p->{message} eq "ARRAY";
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel

Reply via email to