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

Attachments


Subject: add TIMESTAMP
Download (untitled) / with headers
text/plain 124b
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:
Download (untitled) / with headers
text/plain 354b
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.
Download (untitled) / with headers
text/plain 139b
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.


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.