https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16357 --- Comment #16 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 72296 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72296 Bug 16357: (follow-up) Log and timestamp fatal errors Review of attachment 72296: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=16357&attachment=72296) ----------------------------------------------------------------- ::: debian/templates/plack.psgi @@ +41,5 @@
use Log::Log4perl qw(:easy); Log::Log4perl->easy_init({ level => $WARN, utf8 => 1 }); my $logger = Log::Log4perl->get_logger(); # use the default logger style +$SIG{__WARN__} = sub { $logger->warn(shift) }; +$SIG{__DIE__} = sub { $logger->fatal(shift) };
I prefer using my ($message) = @_; because I believe it is less floody prone, though I could be wrong. And while I value vertical space too, I would have left the __WARN__ code unchanged, and mirrored that layout for __DIE__. ::: misc/plack/koha.psgi @@ +9,5 @@
use Log::Log4perl qw(:easy); Log::Log4perl->easy_init({ level => $WARN, utf8 => 1 }); my $logger = Log::Log4perl->get_logger(); # use the default logger style +$SIG{__WARN__} = sub { $logger->warn(shift) }; +$SIG{__DIE__} = sub { $logger->fatal(shift) };
If bug 20393 is valid, this change is unnecessary. -- You are receiving this mail because: You are watching all bug changes.