Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: tim [...] sendgrid.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 0.29



Subject: Bug report / partial patch for Sys::Syslog 0.27
Date: Tue, 2 Mar 2010 10:22:42 -0800
To: bug-sys-syslog [...] rt.cpan.org
From: Tim Jenkins <tim [...] sendgrid.com>
Download (untitled) / with headers
text/plain 1.1k
Hello, While doing some testing between my perl 5.8.8 install and perl 5.10 I found that when I executed openlog("myprog", "ndelay", "mail"); syslog("local0|info", "my message"); the message was still being logged to the mail facility. I upgraded to Sys::Syslog version 0.27, and the issue still persisted. After a bit of hunting, I realized it was because the code was using the native connection method, which only looks at the priority argument, not the facility. I changed the definition to: sub _syslog_send_native { my ($buf, $numpri, $numfac) = @_; syslog_xs($numpri|$numfac, $buf); return 1; } and that worked. Can you please make this change to the next version of Sys::Syslog? Also, I found that if I tried to execute syslog(LOG_LOCAL0|LOG_INFO, "my message") I got an error syslog: level must be given This is because the routine to read the priority seems to assume it will be in word format, and therefore doesn't handle the macros. I could submit a patch for that as well, but since I got what I needed working I haven't looked at the best way to solve that. I will if you want some help though. Please let me know if you have any questions. Regards, Tim
Subject: Re: [rt.cpan.org #55151] Bug report / partial patch for Sys::Syslog 0.27
Date: Mon, 18 Apr 2011 16:22:12 +0200
To: bug-Sys-Syslog [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Tim Jenkins wrote via RT: Show quoted text
> Hello,
Hello, Show quoted text
> While doing some testing between my perl 5.8.8 install and perl 5.10 I > found that when I executed > > openlog("myprog", "ndelay", "mail"); > syslog("local0|info", "my message"); > > the message was still being logged to the mail facility. I upgraded to > Sys::Syslog version 0.27, and the issue still persisted. > > After a bit of hunting, I realized it was because the code was using > the native connection method, which only looks at the priority > argument, not the facility. I changed the definition to: > > sub _syslog_send_native { > my ($buf, $numpri, $numfac) = @_; > syslog_xs($numpri|$numfac, $buf); > return 1; > } > > and that worked. > > Can you please make this change to the next version of Sys::Syslog?
Thanks, applied. Show quoted text
> Also, I found that if I tried to execute > syslog(LOG_LOCAL0|LOG_INFO, "my message") > > I got an error > syslog: level must be given
Fixed in release 0.29 of Sys::Syslog, sponsored by the Perl QA Hackathon 2011 in Amsterdam. -- Sébastien Aperghis-Tramoni 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.