Subject: | Bug in Sys::Syslog after closing and reopening with empty param "logopt" |
Date: | Mon, 21 Sep 2009 15:21:26 +0200 |
To: | "bug-Sys-Syslog [...] rt.cpan.org" <bug-Sys-Syslog [...] rt.cpan.org> |
From: | Herbert Brezina <herbert [...] ls284.net> |
Hello!
I'm not sure if this is a bug ore if it fals under the rule
"The Fifth Rule of Sys::Syslog is: One log at a time"
Bug: after closing and reopenig a log (with logopt='') the option "pid"
will not be overwritten with the empty string.
Means "pid" can't be switched off.
My Test:
--------
#!/usr/bin/perl -w
# PerlSkript zum testen von syslog
use Sys::Syslog;
$program = "syslog_test.pl";
openlog($program, '', 'user');
syslog('info', 'info test');
closelog();
openlog($program, 'pid', 'user');
syslog('info', 'info test');
closelog();
openlog($program, '', 'user');
syslog('info', 'info test');
closelog();
exit;
My Result in the logfile:
-------------------------
Sep 21 13:01:07 hb1 syslog_test.pl: info test
Sep 21 13:01:07 hb1 syslog_test.pl[5617]: info test
Sep 21 13:01:07 hb1 syslog_test.pl[5617]: info test <-- swithing off
does not work
My System:
----------
Linux Suse 11.1
user@hb1:~> uname -a
Linux hb1 2.6.27.29-0.1-default #1 SMP 2009-08-15 17:53:59 +0200 x86_64
x86_64 x86_64 GNU/Linux
user@hb1:~> perl -v
This is perl, v5.10.0 built for x86_64-linux-thread-multi
Sys::Syslog version 0.27
(new compiled from CPAN)
Excuse my bat english.
Thanks
Herbert Brezina