Bug 24306 - Add debug option to koha-indexer
Summary: Add debug option to koha-indexer
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Nick Clemens (kidclamp)
QA Contact: Tomás Cohen Arazi (tcohen)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-24 13:58 UTC by Nick Clemens (kidclamp)
Modified: 2021-06-14 21:33 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
These patches add a --debug switch to the koha-indexer script. This will vastly increase the logging output of the rebuild zebra daemon. This information may be useful for determining why some records are not being indexed.
Version(s) released in:
20.11.00
Circulation function:


Attachments
Bug 24306: Add debug switch to koha-indexer (1.44 KB, patch)
2019-12-24 14:02 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 24306: Add debug switch to koha-indexer (1.49 KB, patch)
2020-02-22 17:26 UTC, David Nind
Details | Diff | Splinter Review
Bug 24306: (follow-up) Add documentation for debug option (1.07 KB, patch)
2020-07-28 12:01 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 24306: Add debug switch to koha-indexer (1.54 KB, patch)
2020-08-11 14:53 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 24306: (follow-up) Add documentation for debug option (1020 bytes, patch)
2020-08-11 14:53 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 24306: (QA follow-up) Fix the XML (1.05 KB, patch)
2020-08-11 14:54 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2019-12-24 13:58:56 UTC
Would be nice to be able to raise logging level and see errors from the indexer
Comment 1 Nick Clemens (kidclamp) 2019-12-24 14:02:44 UTC
Created attachment 96621 [details] [review]
Bug 24306: Add debug switch to koha-indexer

This raises the debug level a lot, it it a bit overwhelming, but may be useful in debugging indexing issues

To test:
1 - Apply patches
2 - sudo koha-indexer --stop instance
3 - sudo debian/scripts/koha-indexer --start --debug instance
4 - tail -f /var/log/koha/instance/indexer-output.log
5 - Note you get a listing that nothign in the queue
6 - Go to staff client and make a change to a record
7 - Note the logs have tons of info
Comment 2 David Nind 2020-02-22 17:26:57 UTC
Created attachment 99460 [details] [review]
Bug 24306: Add debug switch to koha-indexer

This raises the debug level a lot, it it a bit overwhelming, but may be useful in debugging indexing issues

To test:
1 - Apply patches
2 - sudo koha-indexer --stop instance
3 - sudo debian/scripts/koha-indexer --start --debug instance
4 - tail -f /var/log/koha/instance/indexer-output.log
5 - Note you get a listing that nothign in the queue
6 - Go to staff client and make a change to a record
7 - Note the logs have tons of info

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Jonathan Druart 2020-02-24 10:44:28 UTC
Why --debug and not --verbose?
Note that koha-elasticsearch has a verbose flag (and other script in debian/scripts)

You should also update debian/docs/koha-indexer.xml, and maybe tell that the new flag is not for production use, bug debug purpose only (obvious if you keep --debug, but worth a note if we go with --verbose).
Comment 4 Nick Clemens (kidclamp) 2020-02-24 13:47:31 UTC
(In reply to Jonathan Druart from comment #3)
> Why --debug and not --verbose?
> Note that koha-elasticsearch has a verbose flag (and other script in
> debian/scripts)
> 
> You should also update debian/docs/koha-indexer.xml, and maybe tell that the
> new flag is not for production use, bug debug purpose only (obvious if you
> keep --debug, but worth a note if we go with --verbose).

I think I went with debug because it is incredibly verbose.

The script is hardcoded with verbose=1 in the options elsewhere, so you never really have a non-verbose option
Comment 5 Nick Clemens (kidclamp) 2020-07-28 12:01:31 UTC
Created attachment 107460 [details] [review]
Bug 24306: (follow-up) Add documentation for debug option
Comment 6 Tomás Cohen Arazi (tcohen) 2020-08-11 14:53:55 UTC
Created attachment 108073 [details] [review]
Bug 24306: Add debug switch to koha-indexer

This raises the debug level a lot, it it a bit overwhelming, but may be useful in debugging indexing issues

To test:
1 - Apply patches
2 - sudo koha-indexer --stop instance
3 - sudo debian/scripts/koha-indexer --start --debug instance
4 - tail -f /var/log/koha/instance/indexer-output.log
5 - Note you get a listing that nothign in the queue
6 - Go to staff client and make a change to a record
7 - Note the logs have tons of info

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 7 Tomás Cohen Arazi (tcohen) 2020-08-11 14:53:59 UTC
Created attachment 108074 [details] [review]
Bug 24306: (follow-up) Add documentation for debug option

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 8 Tomás Cohen Arazi (tcohen) 2020-08-11 14:54:03 UTC
Created attachment 108075 [details] [review]
Bug 24306: (QA follow-up) Fix the XML

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 9 Jonathan Druart 2020-08-13 05:57:16 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 10 Lucas Gass (lukeg) 2020-08-17 15:27:08 UTC
enhancement will not be backported to 20.05.x