]> git.etc.gen.nz Git - spong.git/commitdiff
Get rid of an extra newline that sometimes sneaks into the log messages.
authorAndrew Ruthven <andrew@etc.gen.nz>
Sun, 23 Dec 2007 09:07:16 +0000 (22:07 +1300)
committerAndrew Ruthven <andrew@etc.gen.nz>
Sun, 23 Dec 2007 09:07:16 +0000 (22:07 +1300)
src/lib/Spong/Logger.pm

index 3e7f9e32cebf66dbbf724f90c219afbb14e91269..627cf187f843610473877fe860ae5926ac9d6a3b 100755 (executable)
@@ -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"; }