Subject: | trailing new line with perror |
When using perror with a non-native method, after each log line an
empty line is printed to stderr.
One new line is added here:
$mask .= "\n" unless $mask =~ /\n$/;
$message = @args ? sprintf($mask, @args) : $mask;
And another one here:
print STDERR "$whoami: $message\n";
This patch fixes the bug:
--- Syslog.pm.orig Fri May 24 02:10:00 2013
+++ Syslog.pm Fri Aug 29 21:35:34 2014
@@ -453,7 +453,7 @@ sub syslog {
if ($options{perror} and $current_proto ne 'native') {
my $whoami = $ident;
$whoami .= "[$$]" if $options{pid};
- print STDERR "$whoami: $message\n";
+ print STDERR "$whoami: $message";
}
# it's possible that we'll get an error from sending