ChangeLog for Log-Contextual
+ - Fix regression that caused D* subs to dumper even if the log level was off
+
0.00304 2010-07-31
- Add $package_UPTO environment variable for WarnLogger
};
*{"Dlog_$level"} = sub (&@) {
- my $code = shift;
- local $_ = (@_?Data::Dumper::Concise::Dumper @_:'()');
- return _do_log( $level => _get_logger( caller ), $code, @_ );
+ my ($code, @args) = @_;
+ return _do_log( $level => _get_logger( caller ), sub {
+ local $_ = (@args?Data::Dumper::Concise::Dumper @args:'()');
+ $code->(@_)
+ }, @args );
};
*{"DlogS_$level"} = sub (&$) {
- local $_ = Data::Dumper::Concise::Dumper $_[1];
- _do_logS( $level => _get_logger( caller ), $_[0], $_[1] )
+ my ($code, $ref) = @_;
+ _do_logS( $level => _get_logger( caller ), sub {
+ local $_ = Data::Dumper::Concise::Dumper $ref;
+ $code->($ref)
+ }, $ref )
};
}