The Perl 5 module Test::Log4perl can be used to test that you're logging the right thing with Log::Log4perl. It checks that we get what, and only what, we expect logged by your code.