Bug 42101 - Add timestamps to Plack logs
Summary: Add timestamps to Plack logs
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Hammat wele
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-03-14 00:30 UTC by Hammat wele
Modified: 2026-03-16 12:14 UTC (History)
4 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Crowdfunding committed: 0
Crowdfunding contact:
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 42101: Add timestamps to Plack logs (5.90 KB, patch)
2026-03-14 00:32 UTC, Hammat wele
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Hammat wele 2026-03-14 00:30:22 UTC
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]
Comment 1 Hammat wele 2026-03-14 00:32:33 UTC
Created attachment 195367 [details] [review]
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]