Skip to content

Conversation

@KES777
Copy link
Contributor

@KES777 KES777 commented Sep 17, 2015

No description provided.

@mohawk2 mohawk2 force-pushed the master branch 12 times, most recently from c8e3096 to a9c1606 Compare September 5, 2020 16:33
@mohawk2
Copy link
Collaborator

mohawk2 commented Sep 6, 2020

What benefit does this bring, given it's an incompatible change?

@KES777
Copy link
Contributor Author

KES777 commented Sep 7, 2020

https://rt.cpan.org/Public/Bug/Display.html?id=107119

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 
@KES777
Copy link
Contributor Author

KES777 commented Sep 7, 2020

Precisely I do not remember. But from commit changes: returning array ref instead of list escapes from many copying. And this will save efficiency

@mohawk2
Copy link
Collaborator

mohawk2 commented Sep 15, 2020

Can you show benchmarks proving this benefit? Otherwise this is unacceptable as a breaking change.

@mohawk2
Copy link
Collaborator

mohawk2 commented Sep 15, 2020

I will close this for now. Please do comment with benchmark evidence if it does really improve things, and if so, it will be considered in that light.

@mohawk2 mohawk2 closed this Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants