Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: res [...] ausics.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.17
Fixed in: 0.19



Subject: Facility function no longer works
Date: Tue, 1 Aug 2006 10:08:47 +1000 (EST)
To: bug-Sys-Syslog [...] rt.cpan.org
From: Res <res [...] ausics.net>
Download (untitled) / with headers
text/plain 321b
Hi, After upgrade to 0.17 syslog("local6.info", "message"); no longer logs to local6, it sends it to normal messages file, I also tried syslog("info|local6", "message"); ending up with same result. This is with no change to syslog.conf, this all worked until july 28 when i went from 0.15 to 0.17 -- Cheers Res
Subject: Re: [rt.cpan.org #20780] Facility function no longer works
Date: Tue, 01 Aug 2006 10:45:00 +0200
To: bug-Sys-Syslog [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Download (untitled) / with headers
text/plain 965b
Show quoted text
> Hi,
Hello, Show quoted text
> After upgrade to 0.17 > syslog("local6.info", "message"); > > no longer logs to local6, it sends it to normal messages file, > I also tried > syslog("info|local6", "message"); > > ending up with same result. > This is with no change to syslog.conf, this all worked until july 28 when > i went from 0.15 to 0.17
I doubt that this problem comes from the upgrade of Sys::Syslog because no functional change has been made regarding facilities between 0.15 and 0.17. This is easy to check by diff'ing these versions: » http://search.cpan.org/diff?from=Sys-Syslog-0.15&to=Sys-Syslog-0.17 Furthermore, the following works as expected: $ cat rt-20780.pl use strict; use Sys::Syslog; openlog("perl", "ndelay,pid", "local6"); syslog("local6.info", "message"); $ perl rt-20780.pl # tail -1 /var/log/facilities/local6 Aug 1 10:42:56 localhost perl[11376]: message Regards, -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
Subject: Re: [rt.cpan.org #20780] Facility function no longer works
Date: Tue, 1 Aug 2006 20:22:52 +1000 (EST)
To: Sébastien Aperghis-Tramoni via RT <bug-Sys-Syslog [...] rt.cpan.org>
From: Res <res [...] ausics.net>
Download (untitled) / with headers
text/plain 400b
Hi, Thanks for reply, Show quoted text
> use Sys::Syslog; > openlog("perl", "ndelay,pid", "local6");
I have never used openlog before, only the lazy way :) This appears to be the problem area, if I use openlog first it now does log to local6, however without openlog it uses /var/log/messages where as I never previously needed to use openlog to use local6. Show quoted text
> syslog("local6.info", "message");
-- Cheers Res
Subject: Re: [rt.cpan.org #20780] Facility function no longer works
Date: Tue, 01 Aug 2006 16:33:17 +0200
To: bug-Sys-Syslog [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Download (untitled) / with headers
text/plain 839b
Show quoted text
> > use Sys::Syslog; > > openlog("perl", "ndelay,pid", "local6");
> > I have never used openlog before, only the lazy way :)
Maybe I should restate the documentation in a more punchy way: The First Rule of Sys::Syslog is: You do not call syslog() before calling openlog(). The Second Rule of Sys::Syslog is: You do not call syslog() before calling openlog(). :) Show quoted text
> This appears to be the problem area, if I use openlog first it now does > log to local6, however without openlog it uses /var/log/messages > where as I never previously needed to use openlog to use local6.
I confirm that I can reproduce the same behaviour: calling syslog() with a facility, and without calling openlog() first, does not set the correct facility in v0.17 while it does in v0.15. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
Subject: Re: [rt.cpan.org #20780] Facility function no longer works
Date: Wed, 2 Aug 2006 08:12:50 +1000 (EST)
To: Sébastien Aperghis-Tramoni via RT <bug-Sys-Syslog [...] rt.cpan.org>
From: Res <res [...] ausics.net>
Download (untitled) / with headers
text/plain 595b
On Tue, 1 Aug 2006, Sébastien Aperghis-Tramoni via RT wrote: Show quoted text
> Maybe I should restate the documentation in a more punchy way: > > The First Rule of Sys::Syslog is: > You do not call syslog() before calling openlog(). > > The Second Rule of Sys::Syslog is: > You do not call syslog() before calling openlog(). > > :)
hehehe, no problems now its going where I want it, but I wonder how many others used the same shortcut I did and are yet to upgrade/discover it no more worky :) ahh well, when they come here they'll soon see the quick fix. Thanks for clearing it up for us. Cheers :)
Subject: Re: [rt.cpan.org #20780] Facility function no longer works
Date: Wed, 2 Aug 2006 01:54:59 +0200
To: bug-Sys-Syslog [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Download (untitled) / with headers
text/plain 666b
Show quoted text
> hehehe, no problems now its going where I want it, but I wonder how > many > others used the same shortcut I did and are yet to upgrade/discover it > no > more worky :) ahh well, when they come here they'll soon see the quick > fix.
Technically this is a problem because a regression has been introduced between versions 0.15 and 0.17 but I currently don't understand how as the changes should have been orthogonal to the functional part of the code affected by this problem. Show quoted text
> Thanks for clearing it up for us.
You're welcome. Sébastien Aperghis-Tramoni -- - --- -- - -- - --- -- - --- -- - --[ http://maddingue.org ] Close the world, txEn eht nepO
Download (untitled) / with headers
text/plain 118b
This issue has been resolved with Sys::Syslog 0.19 Thanks for reporting this bug. -- Close the world, txEn eht nepO.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.