On Fri, 9 Apr 2010, Josh803316 wrote:
> $logger->trace( {filter => \&Data::Dumper::Dumper, value => $name},
> undef, $TRACE, undef, undef); So my question is, how can I log the
> value so it looks like $name instead of $VAR1 in the saved log?
You can pass a reference to a subroutine to Log4perl's
I often use Data::Dumper like this:
print Data::Dumepr->Dump([$name],['name']);
# Which will dump with the variable $name = { } instead of $VAR1 = {
... }
I use log4perl and Data::Dumper like this (from the log4perl faq)
$logger->trace( {filter => \&Data::Dumper::Dumper, value => $name},