Subject: | Test::Log::Log4perl requires tested log points to be logged as a single string |
The following fails to match:
use Test::More;
use Test::Log::Log4perl;
my $log = Log::Log4perl->get_logger('main');
my $tlog = Test::Log::Log4perl->get_logger('main');
Test::Log::Log4perl->start();
$tlog->debug(qr/Hello world/);
$log->debug('Hello ', 'world');
#$log->debug('Hello '. 'world');
Test::Log::Log4perl->end();
done_testing();
__END__
Now, if we simply use a . (dot) instead of a , (comma), then it works fine.
FIX:
In Log::Log4perl::Logger::Interception::log, my $message = shift should
actually be:
my $message = join '', @_;
Then the above works.