Skip Menu |

This queue is for tickets about the Log-Log4perl CPAN distribution.

Report information
The Basics
Id: 60197
Status: resolved
Priority: 0/
Queue: Log-Log4perl

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.19
Fixed in: (no value)



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.
Excellent work ... I've made a few changes to comply with Log4perl rules (no dependencies, clean up test log files) and applied your changes. Thanks much for your contribution! -- Mike http://github.com/mschilli/log4perl/commit/6c948b8483e23e4bcdbb18f458fafb388c8e950e