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

People
Owner: Nobody in particular
Requestors: p.dumarchie [...] blinck.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 2.11
  • 2.21
Fixed in: 2.22



Subject: Log::Dispatch::Syslog throws exceptions on logging
Log::Dispatch::Syslog::log_message() calls Sys::Syslog::syslog(), which may do a syswrite(). When the log message contains a wide character, my perl (v5.8.8 built for i386-freebsd-64int) will throw an exception. This exception is not caught by Log::Dispatch::Syslog. I think it is critical that Log::Dispatch::Syslog catches and/or prevents this exception. Otherwise, the programmer has to wrap every log operation in an eval, just because someday someone might add the very useful Log::Dispatch::Syslog as an appender to a Log::Log4perl configuration. A quick fix would be to use an eval block in Log::Dispatch::Syslog::log_message() and warn when $@ is set. When Encode is avaliable, the following code should prevent the exception: $p{message} = encode("utf8", $p{message}) if is_utf8($p{message}); If you're interested in this solution, I can write a patch and some tests.