#!/usr/bin/env perl

use Log::Report;
use Log::Report::Dispatcher::Log4perl;


my $name  = 'logger';
dispatcher 'Log::Log4perl' => $name, mode => 'DEBUG' , config =>
 { "log4perl.logger.$name"           => "DEBUG, Screen"
 , "log4perl.appender.Screen"        => "Log::Log4perl::Appender::Screen"
 , "log4perl.appender.Screen.layout" => "Log::Log4perl::Layout::PatternLayout"
 , "log4perl.appender.Screen.layout.ConversionPattern" => "%d %F{2} %L> %m"
 };

dispatcher close => 'default';

#local $Log::Log4perl::caller_depth = $Log::Log4perl::caller_depth + 3;

sub test {
    alert "alert!";
    assert "assert!";
    #error "error!";
    #failure "failure!";
    #fault "fault!";
    info "info!";
    mistake "mistake!";
    notice "notice!";
    #panic "panic!";
    trace "trace!";
    warning "warning!";
}

test();
 
__END__

Without the fix in 0.993:

> $ perl log-report.pl
> 2013/03/02 23:37:39 Dispatcher/Log4perl.pm 86> alert: alert!;
>  at log-report.pl line 24
> main::test() at log-report.pl line 37
> 2013/03/02 23:37:39 Dispatcher/Log4perl.pm 86> assert: assert!
>  at log-report.pl line 25
> 2013/03/02 23:37:39 Dispatcher/Log4perl.pm 86> info: info!
> 2013/03/02 23:37:39 Dispatcher/Log4perl.pm 86> mistake: mistake!
>  at log-report.pl line 30
> 2013/03/02 23:37:39 Dispatcher/Log4perl.pm 86> notice: notice!
> 2013/03/02 23:37:39 Dispatcher/Log4perl.pm 86> trace: trace!
> 2013/03/02 23:37:39 Dispatcher/Log4perl.pm 86> warning: warning!
 
Log message should looks like that:
> $ perl log-report.pl
> 2013/03/02 23:38:38 log-report.pl 24> alert: alert!;
>  at log-report.pl line 24
> main::test() at log-report.pl line 37
> 2013/03/02 23:38:38 log-report.pl 25> assert: assert!
>  at log-report.pl line 25
> 2013/03/02 23:38:38 log-report.pl 29> info: info!
> 2013/03/02 23:38:38 log-report.pl 30> mistake: mistake!
>  at log-report.pl line 30
> 2013/03/02 23:38:38 log-report.pl 31> notice: notice!
> 2013/03/02 23:38:38 log-report.pl 33> trace: trace!
> 2013/03/02 23:38:38 log-report.pl 34> warning: warning!
