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

People
Owner: Nobody in particular
Requestors: ssundaram [...] proofpoint.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.21
Fixed in: 2.19



Subject: log4perl.appender.Logfile.utf8=1 not getting passed/Set. Please ignore 36809,37345
This is related to bug# 36809,37345. Please ignore bug# 36809,37345. Both are invalid for different reasons ( incorrectly specified by me ). This bug fix and the patch addresses issue discussed in #36809. This is related to setting utf8 = 1 in the log4perl config file. Please see the appender is :Log::Dispatch::FileRotate. I have included the patch that works for me.Please review and include the fix if that makes sense. thanks. # My log4perl configuration file: log4perl.appender.xxx=Log::Dispatch::FileRotate log4perl.appender.xxx.utf8=1 log4perl.appender.xxx.filename=pathToFilename -------------------------------------------------------------- diff -ur ./File.pm /u/ssundaram/Log-Dispatch-2.21/lib/Log/Dispatch/File.pm --- lib/Log/Dispatch/File.pm 2008-02-06 15:18:42.000000000 -0800 +++ lib/Log/Dispatch/File.pm 2008-06-17 12:40:54.000000000 -0700 @@ -53,7 +53,7 @@ $self->{filename} = $p{filename}; $self->{close} = $p{close_after_write}; $self->{permissions} = $p{permissions}; - $self->{binmode} = $p{binmode}; + $self->{binmode} = $p{binmode} if($p{binmode}); if ( $self->{close} ) { diff -ur ./Output.pm /u/ssundaram/Log-Dispatch-2.21/lib/Log/Dispatch/Output.pm --- lib/Log/Dispatch/Output.pm 2008-06-17 12:43:35.000000000 -0700 +++ lib/Log/Dispatch/Output.pm 2008-06-16 11:27:53.000000000 -0700 @@ -77,6 +77,7 @@ my @cb = $self->_get_callbacks(%p); $self->{callbacks} = \@cb if @cb; + $self->{binmode} = ':utf8' if($p{utf8}); } sub name
On Wed Jul 02 17:27:48 2008, ssundaram wrote: Show quoted text
> This is related to bug# 36809,37345. Please ignore bug# 36809,37345. > Both are invalid for different reasons ( incorrectly specified by me ). > This bug fix and the patch addresses issue discussed in #36809. This is > related to setting utf8 = 1 in the log4perl config file. Please see the > appender is :Log::Dispatch::FileRotate. I have included the patch that > works for me.Please review and include the fix if that makes sense.
thanks. Show quoted text
> > # My log4perl configuration file: > log4perl.appender.xxx=Log::Dispatch::FileRotate > log4perl.appender.xxx.utf8=1 > log4perl.appender.xxx.filename=pathToFilename > > -------------------------------------------------------------- > diff -ur ./File.pm /u/ssundaram/Log-Dispatch-2.21/lib/Log/Dispatch/File.pm > --- lib/Log/Dispatch/File.pm 2008-02-06 15:18:42.000000000 -0800 > +++ lib/Log/Dispatch/File.pm 2008-06-17 12:40:54.000000000 -0700 > @@ -53,7 +53,7 @@ > $self->{filename} = $p{filename}; > $self->{close} = $p{close_after_write}; > $self->{permissions} = $p{permissions}; > - $self->{binmode} = $p{binmode}; > + $self->{binmode} = $p{binmode} if($p{binmode}); > > if ( $self->{close} ) > { > diff -ur ./Output.pm > /u/ssundaram/Log-Dispatch-2.21/lib/Log/Dispatch/Output.pm > --- lib/Log/Dispatch/Output.pm 2008-06-17 12:43:35.000000000 -0700 > +++ lib/Log/Dispatch/Output.pm 2008-06-16 11:27:53.000000000 -0700 > @@ -77,6 +77,7 @@ > > my @cb = $self->_get_callbacks(%p); > $self->{callbacks} = \@cb if @cb; > + $self->{binmode} = ':utf8' if($p{utf8}); > } > > sub name
Well, a year late is better than never, maybe ... I don't get this patch at all. It seems like Log4Perl is doing something wrong here by passing a utf8 flag to Log::Dispatch. Comprehensive binmode support across all relevant outputs would probably be good, but this doesn't really do that at all.