https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43041
--- Comment #4 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 201863 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201863&action=edit Bug 43041: Uncaught exceptions and DBI errors are not timestamped in plack-error.log Bug 16357 added timestamps to Plack warnings by sending them through Log4perl with the LogWarn middleware. Only warnings take that path. Uncaught exceptions, DBI errors, and anything a script prints to STDERR ( technically nothering does that, but reports/catalogue_stats.pl has some debug code that could in theory ) are written to the psgi.errors stream, so they end up in plack-error.log with no timestamp. This makes it hard to tell when an error happened, or to find all the errors for a given day. This patch adds a tied psgi.errors filehandle that sends those writes through Log4perl, so they are logged with a timestamp in plack-<interface>-error.log alongside the warnings. Test Plan: 1) Add a line that dies to the top of a staff script such as mainpage.pl: die "Bug XXXXX test"; 2) Restart plack 3) Load the staff home page 4) Note the exception is written to plack-error.log with no timestamp 6) Apply this patch 7) Restart plack again 8) Reload the staff home page 9) Note the exception is now written to plack-intranet-error.log with a timestamp, and no longer written to plack-error.log! 10) Change the die to a warn 11) Retart plack again 12) Reload the staff home page 13) Verify the warns still come through as they did pre-patch Signed-off-by: Martin Renvoize <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
