diff options
author | Alexis Sukrieh <sukria@sukria.net> | 2010-06-20 13:31:52 +0200 |
---|---|---|
committer | Alexis Sukrieh <sukria@sukria.net> | 2010-06-20 13:31:52 +0200 |
commit | f8eda67e6f0c306c9689e49c6c4e75b8c2a4b6f8 (patch) | |
tree | 18ccce1fa9d5a89f14614483305233dfb791f8fa | |
parent | use format_message to provide a full featured log message (diff) | |
download | dancer-logger-psgi-f8eda67e6f0c306c9689e49c6c4e75b8c2a4b6f8.tar.gz |
remove trailing \n in formated message
-rw-r--r-- | lib/Dancer/Logger/PSGI.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Dancer/Logger/PSGI.pm b/lib/Dancer/Logger/PSGI.pm index d4803f2..2bcb452 100644 --- a/lib/Dancer/Logger/PSGI.pm +++ b/lib/Dancer/Logger/PSGI.pm @@ -14,11 +14,14 @@ sub init {} sub _log { my ( $self, $level, $message ) = @_; + my $full_message = $self->format_message($level => $message); + chomp $full_message; + my $request = Dancer::SharedData->request; if ($request->{env}->{'psgix.logger'}) { $request->{env}->{'psgix.logger'}->( { level => $level, - message => $self->format_message($level => $message) + message => $full_message, } ); } |