Skip Menu |

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

Report information
The Basics
Id: 107119
Status: resolved
Priority: 0/
Queue: Log-Log4perl

People
Owner: Nobody in particular
Requestors: kes-kes [...] yandex.ru
Cc:
AdminCc:

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



Subject: Can not fallback to default join behaviour
in config: log4perl.appender.PsgiAPP.warp_message= MasonHandler::log_filter $ cat app.pl ... $log->error( { zzz => 3 }, 'Hi' ); package MasonHandler; use Data::Dump qw/ pp /; sub log_filter { my @chunks = @_; for my $msg ( @chunks ) { $msg = pp $msg if ref $msg; } return join $Log::Log4perl::JOIN_MSG_ARRAY_CHAR, @chunks; }; I know about [this](http://search.cpan.org/~mschilli/Log-Log4perl-1.46/lib/Log/Log4perl/FAQ.pm#How_can_I_drill_down_on_references_before_logging_them?) But it is too ugly to extra type with every call: $logger->debug( {filter => \&Data::Dumper::Dumper, value => $ref} ); instead of $logger->debug( $ref ); with implemented 'log_filter' as above Please let 'warp_message' do its job and do not add extra [ ] So it would not break 'layout' It seems some discussion here: https://www.mail-archive.com/log4perl-devel@lists.sourceforge.net/msg00025.html
From: kes-kes [...] yandex.ru
You can change behaviour for warp_function https://github.com/mschilli/log4perl/pull/62 Or apply workaround for that BUG: https://github.com/mschilli/log4perl/pull/63 This work around works fine and does not heart existing code