NAME
Plack::Middleware::Log::Minimal - Log::Minimal middleware to prints to psgi.errors
SYNOPSIS
use Log::Minimal;
use Plack::Builder;
builder {
enable "Plack::Middleware::Log::Minimal";
sub {
my $env = shift;
debugf("debug message");
infof("infomation message");
warnf("warning message");
critf("critical message");
["200",[ 'Content-Type' => 'text/plain' ],["OK"]];
};
};
# print "2010-10-20T00:25:17 [INFO] infomation message at example.psgi" to psgi.errors stream
DESCRIPTION
Plack::Middleware::Log::Minimal is middleware that integrates with Log::Minimal. When Log::Minimal log functions like warnf, infof or debugf were used in PSGI Application, this middleware adds requested URI to messages and prints that to psgi.errors stream.
IF $ENV{PLACK_ENV} is "development", Plack::Middleware::Log::Minimal attach color to log using Term::ANSIColor.
AUTHOR
Masahiro Nagano <kazeburo {at} gmail.com>
SEE ALSO
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.