4 use Log::Contextual::SimpleLogger;
5 use Test::More qw(no_plan);
6 use Log::Contextual qw(:log set_logger);
9 my $var_log = Log::Contextual::SimpleLogger->new({
10 levels => [qw(trace debug info warn error fatal)],
13 $var = "$_[0] at $caller_info[1] line $caller_info[2].\n"
16 my $warn_faker = sub {
17 my ($package, $args) = @_;
18 @caller_info = caller($args->{caller_level});
21 set_logger($warn_faker);
23 log_debug { 'test log_debug' };
25 "[debug] test log_debug at " . __FILE__ . " line " . (__LINE__- 2) . ".\n",
28 logS_debug { 'test logS_debug' };
31 "[debug] test logS_debug at " . __FILE__ . " line " . (__LINE__- 3) . ".\n",
35 logS_debug { 'test Dlog_debug' };
38 "[debug] test Dlog_debug at " . __FILE__ . " line " . (__LINE__- 3) . ".\n",
42 logS_debug { 'test DlogS_debug' };
45 "[debug] test DlogS_debug at " . __FILE__ . " line " . (__LINE__- 3) . ".\n",