use warnings FATAL => 'all';
use strict;
warn "foo\n";
warn "bar\n";
__END__
foo
bar
I have never used Log::Log4perl (or any similar logging modules), but I would be surprised if it promoted its warnings to fatals. When I get a chance, I will try to figure out how to use the Log module to confirm your assertion. Feel free to post a small example which proves this. Thanks for pointing this out.
UPDATE: Here is my 1st attempt at using Log::Log4perl. In this mode, the warning is not promoted to a fatal. I have more to learn about the module.
use strict;
use warnings FATAL => 'all';
use Log::Log4perl qw(:easy);
Log::Log4perl->easy_init($DEBUG);
WARN("foo");
DEBUG "A low-level message";
ERROR "Won't make it until level gets increased to ERROR";
WARN('bar');
__END__
2011/10/12 21:05:08 foo
2011/10/12 21:05:08 A low-level message
2011/10/12 21:05:08 Won't make it until level gets increased to ERROR
2011/10/12 21:05:08 bar
I also tried the Core Log::Message module, and I did not observe warnings turning into fatals there either. |