in reply to Re^2: Log4perl, Data::Dumper and varname
in thread Log4perl, Data::Dumper and varname

I looked through both of those posts but wasn't sure how I could use the information to dump the $logger variable with a different name then $VAR1.

There is only about 3 direct replies with actual code. Pick one and test (I'd go for the one which references Data::Dumper the most).

  • Comment on Re^3: Log4perl, Data::Dumper and varname

Replies are listed 'Best First'.
Re^4: Log4perl, Data::Dumper and varname
by josh803316 (Beadle) on Apr 09, 2010 at 15:48 UTC
    Here is the solution which seems to work for me:

    $logger->trace( sub { Data::Dumper->Dump($name, 'name') }, undef, $TRACE, undef, undef );