Hi, I don't see what is the mystery? From what you've shown, the module prints messages using Log::Log4perl to STDERR. When you test this, your test succeeds. When you look for the messages on STDOUT, they are not there, unsurprisingly. If you want to see the messages on STDOUT, you need to configure your logger to send them there.
From Log::Log4perl::Appender::Screen:
If stderr is set to a false value, it will log to STDOUT (or, more accurately, whichever file handle is selected via select(), STDOUT by default).use Log::Log4perl::Appender::Screen; my $app = Log::Log4perl::Appender::Screen->new( stderr => 0, utf8 => 1, );
(Disclaimer: I don't use Log::Log4perl myself: I prefer Log::Any.)
Hope this helps!
In reply to Re: How can you get normal log output when testing log output with Test::Output?
by 1nickt
in thread How can you get normal log output when testing log output with Test::Output?
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |