[Bug 27291] New: Change datetime format in Zebra logs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 Bug ID: 27291 Summary: Change datetime format in Zebra logs Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching - Zebra Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au At the moment, Zebra logs using a dateformat of "hh:mm:ss-DD/MM". For example, "23:16:22-21/12". I propose that we change it to use the dateformat of "%F %T" or "%FT%T". For example, "2020-12-21 23:16:41" or "2020-12-21T23:21:19" It can be done by adding the following option to zebrasrv: -m "%F %T" or -m "%FT%T" While this option doesn't obviously appear in "man zebrasrv", it does appear in "man yaz-ztest" and the manpage for zebrasrv says that zebrasrv has the same options as "yaz-ztest". -- 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=27291 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27139 -- 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=27291 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- One of the reasons for changing the dateformat is to improve log file monitoring of Zebra. -- 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=27291 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=27291 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Created attachment 114581 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114581&action=edit 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" -- 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=27291 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | -- 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=27291 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |testopia@bugs.koha-communit | |y.org Component|Searching - Zebra |Packaging --- Comment #3 from David Cook <dcook@prosentient.com.au> --- Actually going to switch the component from "Searching - Zebra" to "Packaging" as that might be more accurate... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|dcook@prosentient.com.au |koha-bugs@lists.koha-commun | |ity.org -- 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=27291 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | -- 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=27291 --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Does this require that the Zebra log be enabled somehow? zebra-output.log is empty. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- (In reply to Owen Leonard from comment #4)
Does this require that the Zebra log be enabled somehow? zebra-output.log is empty.
Ah possibly! If you update the koha-conf.xml with the following: <zebra_loglevels>none,fatal,warn,request</zebra_loglevels> Then restart memcached and plack, then you should get some output. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- I applied the patch, updated my koha-conf, and restarted everything. I still see timestamps like this: 20:57:34-08/11 Quite possible I am doing something wrong. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 --- Comment #7 from David Cook <dcook@prosentient.com.au> --- (In reply to Lucas Gass from comment #6)
I applied the patch, updated my koha-conf, and restarted everything. I still see timestamps like this:
20:57:34-08/11
Quite possible I am doing something wrong.
That's interesting. I applied the patch, updated my koha-conf.xml, and otherwise followed the test plan, and I'm seeing this: 2023-11-08T23:14:52 zebrasrv(1) [request] Auth idPass kohauser - 2023-11-08T23:14:52 zebrasrv(1) [request] Init OK - ID:81 Name:ZOOM-C/YAZ Version:5.30.3 2af59bc45cf4508d5c84f350ee99804c4354b3b3 2023-11-08T23:14:52 zebrasrv(1) [request] Search biblios OK 393 1 1+0 RPN @attrset Bib-1 @attr 1=1016 @attr 4=6 @attr 5=1 @attr 2=102 e 2023-11-08T23:14:52 zebrasrv(1) [request] Present OK - 1 1+1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 --- Comment #8 from David Cook <dcook@prosentient.com.au> --- Revised Test plan: 0. vi /etc/koha/sites/kohadev/koha-conf.xml Update zebra_loglevels to the following: <zebra_loglevels>none,fatal,warn,request</zebra_loglevels> 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" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114581|0 |1 is obsolete| | --- Comment #9 from David Nind <david@davidnind.com> --- Created attachment 160389 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160389&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This enhancement changes release notes| |the Zebra output log time | |format from the default | |"hh:mm:ss-DD/MM" to the | |more standard ISO 8601 | |"%FT%T". | | | |This makes the | |logs easier to read for | |both humans and machines. | |One benefit includes easy | |searching and sorting. --- Comment #10 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. Note the amended test plan in comment #8 (particularly to change the log level) 2. Koha package commands: use sudo in front or access shell as ktd --root --shell -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160389|0 |1 is obsolete| | --- Comment #11 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 160919 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160919&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36191 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36191 [Bug 36191] Logs format should be consistent -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |24.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting --- Comment #13 from Fridolin Somers <fridolin.somers@biblibre.com> --- Not backported to 23.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Packaging |Transaction logs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 --- Comment #14 from David Cook <dcook@prosentient.com.au> --- I'd marked this one as Packaging as it only affects packaged Koha, but all good -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to David Cook from comment #14)
I'd marked this one as Packaging as it only affects packaged Koha, but all good
Hm, can you explain why that is? Why does the loggging for tarball Koha differ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 --- Comment #16 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #15)
(In reply to David Cook from comment #14)
I'd marked this one as Packaging as it only affects packaged Koha, but all good
Hm, can you explain why that is? Why does the loggging for tarball Koha differ?
When you install Koha from a tarball, you have to set up your own Zebra service and the logging format is based off a command line parameter. I suppose we could also update ./misc/bin/koha-zebra-ctl.sh although we haven't in the past when we added the "-k $max_record_size" parameter. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thx for the explanation, been a while since I did a tarball one :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 --- Comment #18 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #17)
Thx for the explanation, been a while since I did a tarball one :)
Me too! Other than for testing the build process hehe. I do love packages :3 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27291 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED CC| |caroline.cyr-la-rose@inlibr | |o.com Resolution|--- |FIXED --- Comment #19 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- I don't see anything that needs to be added or edited in the end user manual. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org