Skip Menu |

This queue is for tickets about the Sys-Syslog CPAN distribution.

Report information
The Basics
Id: 20164
Status: resolved
Priority: 0/
Queue: Sys-Syslog

People
Owner: SAPER [...] cpan.org
Requestors: ntyni [...] iki.fi
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.16
Fixed in: 0.17



Subject: connect_unix() breaks if setlogsock is called first
Hi, in Sys::Syslog 0.16, syslog() is failing with no connection to syslog available - _PATH_LOG not available in syslog.h at /home/niko/t.pl line 5 if setlogsock('unix') is called first. Sample program: #!/usr/bin/perl -w use Sys::Syslog qw(:DEFAULT setlogsock); setlogsock('unix'); openlog("test", 'pid', 'local0'); syslog('local0|info', "test"); This happens because the test at the beginning of connect_unix() isn't prepared for the case where $syslog_path is already defined. Proposed patch attached. I have verified this on perl 5.8.8, on Debian GNU/Linux. Cheers, -- Niko Tyni ntyni@iki.fi
Subject: syslog-patch
Download syslog-patch
application/octet-stream 340b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #20164] connect_unix() breaks if setlogsock is called first
Date: Wed, 28 Jun 2006 16:22:44 +0200
To: bug-Sys-Syslog [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Show quoted text
> in Sys::Syslog 0.16, syslog() is failing [...] if setlogsock('unix') > is called first. > > This happens because the test at the beginning of connect_unix() isn't > prepared for the case where $syslog_path is already defined.
This is indeed a bug that was added with version 0.16. Show quoted text
> Proposed patch attached.
Thanks. It will be included in the next release. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
From: GIRAFFED [...] cpan.org
The message would be more accurate as, "_PATH_LOG not available in syslog.h and you didn't specify a log socket name with setlogsock()." I.e. _PATH_LOG isn't actually required.
Subject: Re: [rt.cpan.org #20164] connect_unix() breaks if setlogsock is called first
Date: Fri, 21 Jul 2006 03:13:41 +0200
To: bug-Sys-Syslog [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Show quoted text
> The message would be more accurate as, "_PATH_LOG not available in > syslog.h and you didn't specify a log socket name with setlogsock()." > > I.e. _PATH_LOG isn't actually required.
Correct. Thanks for noting. Sébastien Aperghis-Tramoni -- - --- -- - -- - --- -- - --- -- - --[ http://maddingue.org ] Close the world, txEn eht nepO