Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: hirose31 [...] t3.rim.or.jp
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: 0.11



Subject: add TIMESTAMP
I want logging not timestamp of receiving syslogd but timestamp of do syslog(). Please add timestamp before syslog_send().
--- Syslog.pm.orig 2005-12-08 10:03:17.000000000 +0900 +++ Syslog.pm 2005-12-19 21:10:15.000000000 +0900 @@ -25,6 +25,7 @@ use Socket ':all'; use Sys::Hostname; +use POSIX qw(strftime locale_h); =head1 NAME @@ -569,7 +570,11 @@ $message = @_ ? sprintf($mask, @_) : $mask; $sum = $numpri + $numfac; - my $buf = "<$sum>$whoami: $message\0"; + my $oldlocale = setlocale(LC_TIME); + setlocale(LC_TIME, 'C'); + my $timestamp = strftime "%b %e %T", localtime; + setlocale(LC_TIME, $oldlocale); + my $buf = "<$sum>$timestamp $whoami: $message\0"; # it's possible that we'll get an error from sending # (e.g. if method is UDP and there is no UDP listener,
Date: Wed, 21 Dec 2005 01:24:05 +0100
From: Sébastien Aperghis-Tramoni <maddingue [...] free.fr>
To: bug-Sys-Syslog [...] rt.cpan.org
Subject: Re: [cpan #16604] add TIMESTAMP
RT-Send-Cc:
Guest via RT <bug-Sys-Syslog@rt.cpan.org>: Show quoted text
> I want logging not timestamp of receiving syslogd but timestamp of do > syslog(). > > Please add timestamp before syslog_send().
Thanks, I've appplied this patch but I have to do a few more tests and additions before releasing a new version. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
Patch and accepted with a minor change to make it compatible with Perl 5.6. Included in version 0.11. -- Close the world, txEn eht nepO.