Subject: | Lines ending with \n on OS X 10.4 |
I am running the following test script on my PPC OSX machine (This is
perl, v5.8.6 built for darwin-thread-multi-2level) and I am seeing some
strangeness:
#!/usr/bin/perl -w
use strict;
use warnings;
use Sys::Syslog qw(:standard :macros);
my $ident = "testLogger";
my $logopt = "pid";
my $facility = "LOG_LOCAL0"; # Writes to the same
place as ipfw
openlog $ident, $logopt, $facility;
syslog LOG_INFO, "%s", "This is my test message";
syslog LOG_INFO, "This is another test message";
closelog;
The resulting lines in the log read:
Jan 18 13:26:35 Desktop testLogger[18393]: This is my test message\n
Jan 18 13:26:35 Desktop testLogger[18393]: This is another test message\n
Note the literal \n on the end of each line. Is there some way to get
rid of this?