From: Andrew Ruthven Date: Sun, 23 Dec 2007 09:07:16 +0000 (+1300) Subject: Get rid of an extra newline that sometimes sneaks into the log messages. X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce781bdbf068035691e842cd00e559f261771fd9;p=spong.git Get rid of an extra newline that sometimes sneaks into the log messages. --- diff --git a/src/lib/Spong/Logger.pm b/src/lib/Spong/Logger.pm index 3e7f9e3..627cf18 100755 --- a/src/lib/Spong/Logger.pm +++ b/src/lib/Spong/Logger.pm @@ -73,6 +73,9 @@ sub log { my( $self, $message, $pri ) = @_; $pri = $self->{priority} if ! defined $pri; + # Remove any extraneous newlines. + chomp($message); + if ($self->{stdout}) { print scalar localtime() , " ", $message,"\n"; } if ($self->{stderr}) { print STDERR scalar localtime(), " ",$message,"\n"; }