[Bug 42101] New: Add timestamps to Plack logs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42101 Bug ID: 42101 Summary: Add timestamps to Plack logs Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: hammat.wele@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Plack logs (e.g., plack-intranet.log) do not include timestamps in the same format as other Koha logs. Test plan 1- Disable Plack sudo koha-plack --disable kohadev sudo koha-plack --stop kohadev sudo service apache2 restart 2- Create an error mv mainpage.pl mainpage.pl.test 3- Go to: http://intranet/cgi-bin/koha/mainpage.pl 4- Check the logs: tail /var/log/koha/kohadev/intranet-error.log The date is correctly formatted: [Fri Mar 13 23:48:12.505999 2026] 5- Enable Plack sudo koha-plack --enable kohadev sudo koha-plack --start kohadev sudo service apache2 restart 6- Repeat steps 3 and 4 ==> the date format is different from step 4. 7- Modify /etc/koha/sites/kohadev/log4perl.conf and Replace [%d] with: [%d{EEE MMM dd HH:mm:ss yyyy}] (This is exactly what the patch does) 8- Restart Plack sudo koha-plack --restart kohadev 9- Repeat steps 3 and 4 The format is now consistent with step 4. [Fri Mar 13 23:52:30 2026] -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42101 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |hammat.wele@inlibro.com |ity.org | CC| |caroline.cyr-la-rose@inlibr | |o.com, | |philippe.blouin@inlibro.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42101 --- Comment #1 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 195367 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195367&action=edit Bug 42101: Add timestamps to Plack logs Plack logs (e.g., plack-intranet.log) do not include timestamps in the same format as other Koha logs. Test plan 1- Disable Plack sudo koha-plack --disable kohadev sudo koha-plack --stop kohadev sudo service apache2 restart 2- Create an error mv mainpage.pl mainpage.pl.test 3- Go to: http://intranet/cgi-bin/koha/mainpage.pl 4- Check the logs: tail /var/log/koha/kohadev/intranet-error.log The date is correctly formatted: [Fri Mar 13 23:48:12.505999 2026] 5- Enable Plack sudo koha-plack --enable kohadev sudo koha-plack --start kohadev sudo service apache2 restart 6- Repeat steps 3 and 4 ==> the date format is different from step 4. 7- Modify /etc/koha/sites/kohadev/log4perl.conf and Replace [%d] with: [%d{EEE MMM dd HH:mm:ss yyyy}] (This is exactly what the patch does) 8- Restart Plack sudo koha-plack --restart kohadev 9- Repeat steps 3 and 4 The format is now consistent with step 4. [Fri Mar 13 23:52:30 2026] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42101 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42101 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42101 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #2 from David Nind <david@davidnind.com> --- I attempted to test (using KTD), but I'm not getting the results in the test plan: 1. For step 4, I get: [Fri May 22 23:02:40.796083 2026] [cgi:error] [pid 2177:tid 2177] [client 172.18.0.1:42650] AH02811: stderr from /kohadevbox/koha/mainpage.pl: script not found or unable to stat 2. For step 6, there is no new log entries output by the tail command: [Fri May 22 23:02:40.796083 2026] [cgi:error] [pid 2177:tid 2177] [client 172.18.0.1:42650] AH02811: stderr from /kohadevbox/koha/mainpage.pl: script not found or unable to stat There is no new log entry, so not sure how to reproduce the problem. Command line output for steps 1 to 6 ==================================== Step 1 ------ sudo koha-plack --disable kohadev Plack disabled for kohadev OPAC Plack disabled for kohadev Intranet sudo koha-plack --stop kohadev Stopping Plack daemon for kohadev:. sudo service apache2 restart Restarting Apache httpd web server: apache2. Step 2 ------ mv mainpage.pl mainpage.pl.test Step 3 ------ Accessing 127.0.0.1:8081/cgi-bin/koha/mainpage.pl generates an Error 404 page. Step 4 ------ tail /var/log/koha/kohadev/intranet-error.log [Fri May 22 23:02:40.796083 2026] [cgi:error] [pid 2177:tid 2177] [client 172.18.0.1:42650] AH02811: stderr from /kohadevbox/koha/mainpage.pl: script not found or unable to stat Step 5 ------ sudo koha-plack --enable kohadev Plack enabled for kohadev OPAC Plack enabled for kohadev Intranet sudo koha-plack --start kohadev Starting Plack daemon for kohadev:. sudo service apache2 restart Restarting Apache httpd web server: apache2 Step 6 ------ tail /var/log/koha/kohadev/intranet-error.log [Fri May 22 23:02:40.796083 2026] [cgi:error] [pid 2177:tid 2177] [client 172.18.0.1:42650] AH02811: stderr from /kohadevbox/koha/mainpage.pl: script not found or unable to stat -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org