Bugzilla – Attachment 114581 Details for
Bug 27291
Change datetime format in Zebra logs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27291: Reformat Zebra output logs
Bug-27291-Reformat-Zebra-output-logs.patch (text/plain), 1.79 KB, created by
David Cook
on 2020-12-22 00:23:34 UTC
(
hide
)
Description:
Bug 27291: Reformat Zebra output logs
Filename:
MIME Type:
Creator:
David Cook
Created:
2020-12-22 00:23:34 UTC
Size:
1.79 KB
patch
obsolete
>From 95495dd0a53dabd8b5eaec96de31c5f50b648f62 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Tue, 22 Dec 2020 00:15:02 +0000 >Subject: [PATCH] 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" >--- > debian/scripts/koha-zebra | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/debian/scripts/koha-zebra b/debian/scripts/koha-zebra >index 0bd11aa7bc..bf0f450bad 100755 >--- a/debian/scripts/koha-zebra >+++ b/debian/scripts/koha-zebra >@@ -79,11 +79,12 @@ start_zebra() > ZEBRA_PARAMS="-v $loglevels \ > -k $max_record_size \ > -f /etc/koha/sites/${name}/koha-conf.xml" >+ ZEBRA_TIMEFORMAT='%FT%T' > > [ "$verbose" != "no" ] && \ > log_daemon_msg "Starting Koha Zebra daemon for ${name}" > >- if daemon $DAEMONOPTS -- $ZEBRA_DAEMON $ZEBRA_PARAMS; then >+ if daemon $DAEMONOPTS -- $ZEBRA_DAEMON $ZEBRA_PARAMS -m "$ZEBRA_TIMEFORMAT"; then > ([ "$verbose" != "no" ] && \ > log_end_msg 0) || return 0 > else >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27291
:
114581
|
160389
|
160919