Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Log-Dispatch CPAN distribution.

Report information
The Basics
Id: 26711
Status: resolved
Priority: 0/
Queue: Log-Dispatch

People
Owner: Nobody in particular
Requestors: mark [...] blackmans.org
Cc:
AdminCc:

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



Subject: split up multiline messages sent to Log::Dispatch::Syslog
The Text::SimpleTable module in Catalyst routinely generates multi-line strings which Catalyst routinely sends to it's logging output which when piped into Log::Dispatch::Syslog looks very messy in the end result. This patch allows these outputs to show up reasonably in syslog logs.
Subject: Log-Dispatch-Syslog-patch.txt
--- Log/Dispatch/Syslog.pm 2007-03-30 12:46:06.000000000 +0100 +++ - 2007-04-26 15:01:27.000000000 +0100 @@ -74,7 +74,9 @@ my $pri = $self->_level_as_number($p{level}); Sys::Syslog::openlog($self->{ident}, $self->{logopt}, $self->{facility}); - Sys::Syslog::syslog($self->{priorities}[$pri], '%s', $p{message}); + foreach (split /\n/,$p{message} ){ + Sys::Syslog::syslog($self->{priorities}[$pri], '%s', $_); + } Sys::Syslog::closelog; }
On Thu Apr 26 10:05:04 2007, mark@blackmans.org wrote: Show quoted text
> The Text::SimpleTable module in Catalyst routinely generates multi-line > strings which Catalyst routinely sends to it's logging output which when > piped into Log::Dispatch::Syslog looks very messy in the end result. > This patch allows these outputs to show up reasonably in syslog logs.
For backwards compatibility, this would have to be an option (off by default). Tests wouldn't hurt either ;)
Subject: Re: [rt.cpan.org #26711] split up multiline messages sent to Log::Dispatch::Syslog
Date: Fri, 23 Nov 2007 13:38:29 +0000
To: bug-Log-Dispatch [...] rt.cpan.org
From: Mark Blackman <mark [...] blackmans.org>
On 2 Nov 2007, at 02:37, via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=26711 > > > On Thu Apr 26 10:05:04 2007, mark@blackmans.org wrote:
>> The Text::SimpleTable module in Catalyst routinely generates multi- >> line >> strings which Catalyst routinely sends to it's logging output >> which when >> piped into Log::Dispatch::Syslog looks very messy in the end result. >> This patch allows these outputs to show up reasonably in syslog logs.
> > For backwards compatibility, this would have to be an option (off by > default). Tests wouldn't hurt either ;) >
Ok, I'm not quite sure what a straightforward mechanism for testing syslog output is, any clues for me? Not yet checked existing tests, so maybe that's where to start. Cheers, Mark
Subject: Re: [rt.cpan.org #26711] split up multiline messages sent to Log::Dispatch::Syslog
Date: Sun, 2 Dec 2007 10:38:29 -0600 (CST)
To: "mark [...] blackmans.org via RT" <bug-Log-Dispatch [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Fri, 23 Nov 2007, mark@blackmans.org via RT wrote: Show quoted text
>> For backwards compatibility, this would have to be an option (off by >> default). Tests wouldn't hurt either ;)
> > Ok, I'm not quite sure what a straightforward mechanism for testing > syslog output is, any clues for me? Not yet checked existing tests, > so maybe that's where to start.
Unfortunately, I don't have any syslog tests either. I think the way to do it would be to monkey-patch Sys::Syslog to override it's functions and then check what gets passed to them. -dave /*=================================================== VegGuide.Org www.BookIRead.com Your guide to all that's veg. My book blog ===================================================*/
Subject: Re: [rt.cpan.org #26711] split up multiline messages sent to Log::Dispatch::Syslog
Date: Sun, 2 Dec 2007 10:38:29 -0600 (CST)
To: "mark [...] blackmans.org via RT" <bug-Log-Dispatch [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Fri, 23 Nov 2007, mark@blackmans.org via RT wrote: Show quoted text
>> For backwards compatibility, this would have to be an option (off by >> default). Tests wouldn't hurt either ;)
> > Ok, I'm not quite sure what a straightforward mechanism for testing > syslog output is, any clues for me? Not yet checked existing tests, > so maybe that's where to start.
Unfortunately, I don't have any syslog tests either. I think the way to do it would be to monkey-patch Sys::Syslog to override it's functions and then check what gets passed to them. -dave /*=================================================== VegGuide.Org www.BookIRead.com Your guide to all that's veg. My book blog ===================================================*/