diff options
author | Alexis Sukrieh <sukria@sukria.net> | 2010-06-20 13:25:06 +0200 |
---|---|---|
committer | Alexis Sukrieh <sukria@sukria.net> | 2010-06-20 13:25:06 +0200 |
commit | 7ccf1af1177a9285c03f0a31fb3d96e7c5a2346c (patch) | |
tree | 38238a23a7b5d0ba0ad423ea9cccd2d81b68ccbb | |
parent | merge (diff) | |
download | dancer-logger-psgi-7ccf1af1177a9285c03f0a31fb3d96e7c5a2346c.tar.gz |
use format_message to provide a full featured log message
-rw-r--r-- | lib/Dancer/Logger/PSGI.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Dancer/Logger/PSGI.pm b/lib/Dancer/Logger/PSGI.pm index 9134e2b..d4803f2 100644 --- a/lib/Dancer/Logger/PSGI.pm +++ b/lib/Dancer/Logger/PSGI.pm @@ -15,9 +15,12 @@ sub init {} sub _log { my ( $self, $level, $message ) = @_; my $request = Dancer::SharedData->request; - if ( $request->{env}->{'psgix.logger'} ) { - $request->{env}->{'psgix.logger'} - ->( { level => $level, message => $message } ); + if ($request->{env}->{'psgix.logger'}) { + $request->{env}->{'psgix.logger'}->( + { level => $level, + message => $self->format_message($level => $message) + } + ); } } |