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: 93045
Status: resolved
Priority: 0/
Queue: Log-Dispatch

People
Owner: Nobody in particular
Requestors: david [...] coppit.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.43



Subject: Log::Dispatch::Syslog doesn't support remote rsyslogd logging
Date: Fri, 14 Feb 2014 17:43:49 -0500
To: bug-Log-Dispatch [...] rt.cpan.org
From: David Coppit <david [...] coppit.org>
Download (untitled) / with headers
text/plain 1.3k
As of version 0.28 of Sys::Syslog, clients can pass a hash reference that allows one to specify parameters for remote logging. The patch below adds support for this feature in Log::Dispatch::Syslog. --- /root/Syslog.pm.old 2014-02-14 22:30:50.364721315 +0000 +++ /usr/share/perl5/vendor_perl/Log/Dispatch/Syslog.pm 2014-02-14 22:36:27.792696610 +0000 @@ -10,7 +10,7 @@ use base qw( Log::Dispatch::Output ); -use Params::Validate qw(validate ARRAYREF SCALAR); +use Params::Validate qw(validate ARRAYREF HASHREF SCALAR); Params::Validate::validation_options( allow_extra => 1 ); use Sys::Syslog 0.16 (); @@ -49,7 +49,7 @@ default => 'user' }, socket => { - type => SCALAR | ARRAYREF, + type => SCALAR | ARRAYREF | HASHREF, default => undef }, } @@ -72,7 +72,8 @@ ]; Sys::Syslog::setlogsock( - ref $self->{socket} ? @{ $self->{socket} } : $self->{socket} ) + ref $self->{socket} eq 'ARRAY' ? @{ $self->{socket} } : + $self->{socket} ) if defined $self->{socket}; } @@ -170,7 +171,8 @@ portable. If you pass an array reference, it is dereferenced and passed to -C<Sys::Syslog::setlogsock()>. +C<Sys::Syslog::setlogsock()>. If you pass a hash reference, it is +passed directly to C<Sys::Syslog::setlogsock()>. =back


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.