Subject: | Log::Log4perl::Layout::PatternLayout::Multiline does not handle consecutive newlines |
Symptoms: uninitialized value warnings (or syswrite errors) when logging
"\n\n", or *any* message with consecutive newlines that passes through
logconfess() (because logconfess splits on /\n/ before sending each line
to fatal()).
Cause: Log::Log4perl::Layout::PatternLayout::Multiline is not
initializing its $result variable. When passed a line consisting only of
newlines, the for loop never executes, and undef is returned, which then
causes various appenders to warn.
I have created a test case that reproduces this issue, and fixed the
code, in the 'multiline_bug' branch at
http://github.com/karenetheridge/log4perl.