NAME
Plack::Middleware::Debug::Log4perl
Plack debug panel to show detailed Log4perl debug messages.
SYNOPSIS
use Plack::Builder;
use Plack::Middleware::Debug::Log4perl;
builder {
enable 'Debug', panels => [qw/Memory Timer Log4perl/];
enable 'Log4perl', category => 'plack', conf => \$log4perl_conf;
$app;
};
DESCRIPTION
This module provides a plack debug panel that displays the Log4perl messages for the current HTTP request.
Ideally configure Log4perl using Plack::Midleware::Log4perl, or directly in your .psgi file. This way we can hook into the root logger at run time and create the required stealth logger automatically. If you're able to do this, you can skip the next bit.
For applications that configure / init their own logger, you must create a Log4perl appender using TestBuffer, named 'log4perl_debug_panel'.
In your Log4perl.conf:
log4perl.rootLogger = TRACE, DebugPanel
log4perl.appender.DebugPanel = Log::Log4perl::Appender::TestBuffer
log4perl.appender.DebugPanel.name = psgi_debug_panel
log4perl.appender.DebugPanel.mode = append
log4perl.appender.DebugPanel.layout = PatternLayout
log4perl.appender.DebugPanel.layout.ConversionPattern = %r >> %p >> %m >> %c >> at %F line %L%n
log4perl.appender.DebugPanel.Threshold = TRACE
SEE ALSO
Log4perl: Log::Log4perl
Plack Debug Panel: Plack::Middleware::Debug
Source Repository: http://github.com/miketonks/Plack-Middleware-Debug-Log4perl
AUTHORS
Mike Tonks
Thanks to Lyle Hopkins (Bristol & Bath Perl Mongers) for help with the threading tests.
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.