Bug 27291: Reformat Zebra output logs
authorDavid Cook <dcook@prosentient.com.au>
Tue, 22 Dec 2020 00:15:02 +0000 (00:15 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 22 Mar 2024 09:35:25 +0000 (10:35 +0100)
commit6405431b3859e57a8cf110d717d85cb5753ad45f
treed6618ea25f5e5c19b268c9b8ab184c0b5013e8e9
parent30816a7fc5bbad5da9a567ae7d3ca16dfc478bdf
Bug 27291: Reformat Zebra output logs

This patch changes the Zebra output log time format from
the default "hh:mm:ss-DD/MM" to the more standard ISO 8601
"%FT%T".

This change makes the logs easier to read for both
humans and machines. One benefit includes easy searching
and sorting.

Test plan:

1. cp debian/scripts/koha-zebra /usr/sbin/koha-zebra
2. koha-zebra --stop kohadev
3. koha-zebra --start kohadev
4. ps -efww | grep "zebrasrv"
5. Note "-m %FT%T" in the grep output
6. tail -f /var/log/koha/kohadev/zebra-output.log
7. Run a few searches like http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=ccl%3Dargawarga%3D1 or http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=e
8. Note that the timestamp in the Zebra log is formatted "2020-12-22T00:13:42" instead of like "00:13:42-22/12"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
debian/scripts/koha-zebra