Bug 28555

Summary: Improve output of verbose option for overdue_notices.pl
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Command-line UtilitiesAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: enhancement    
Priority: P5 - low CC: lucas, robin
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28487
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Attachments: Bug 28555: Improve logging for overdue_notices.pl
Bug 28555: Improve logging for overdue_notices.pl
Bug 28555: Improve logging for overdue_notices.pl
Bug 28555: (follow-up) Make verbose count flags passed
Bug 28555: (follow-up) Add to script documenation
Bug 28555: Improve logging for overdue_notices.pl
Bug 28555: (follow-up) Make verbose count flags passed
Bug 28555: (follow-up) Add to script documenation

Description Nick Clemens (kidclamp) 2021-06-11 14:59:28 UTC
The logging for this cronjob is a bit overwhelming

To recreate:
perl misc/cronjobs/overdue_notices.pl -v
Comment 1 Nick Clemens (kidclamp) 2021-06-11 15:15:36 UTC
Created attachment 121855 [details] [review]
Bug 28555: Improve logging for overdue_notices.pl

Currenlty the output with -v from overdue_notices is a bit overwhelming and hard to parse

I do a few things here:
1 - Only show SQL if verbose > 1
2 - Add some separators to make it more readab;e
3 - Remove some redundant messages with branchcode and borrowernumber

To test:
1: perl misc/cronjobs/overdue_notices.pl -v
2: Notice you get a LOT of information all smushed together
3: Apply patch
4: perl misc/cronjobs/overdue_notices.pl -v
5: Less info, and easier to read
6: perl misc/cronjobs/overdue_notices.pl -v -v
7: All the info, but nicer to read
Comment 2 Lucas Gass 2022-04-27 15:13:25 UTC
Created attachment 134076 [details] [review]
Bug 28555: Improve logging for overdue_notices.pl

Currenlty the output with -v from overdue_notices is a bit overwhelming and hard to parse

I do a few things here:
1 - Only show SQL if verbose > 1
2 - Add some separators to make it more readab;e
3 - Remove some redundant messages with branchcode and borrowernumber

To test:
1: perl misc/cronjobs/overdue_notices.pl -v
2: Notice you get a LOT of information all smushed together
3: Apply patch
4: perl misc/cronjobs/overdue_notices.pl -v
5: Less info, and easier to read
6: perl misc/cronjobs/overdue_notices.pl -v -v
7: All the info, but nicer to read
Comment 3 Lucas Gass 2022-04-27 15:13:54 UTC
rebased for current master
Comment 4 David Nind 2022-09-25 04:45:01 UTC
Created attachment 140968 [details] [review]
Bug 28555: Improve logging for overdue_notices.pl

Currenlty the output with -v from overdue_notices is a bit overwhelming and hard to parse

I do a few things here:
1 - Only show SQL if verbose > 1
2 - Add some separators to make it more readab;e
3 - Remove some redundant messages with branchcode and borrowernumber

To test:
1: perl misc/cronjobs/overdue_notices.pl -v
2: Notice you get a LOT of information all smushed together
3: Apply patch
4: perl misc/cronjobs/overdue_notices.pl -v
5: Less info, and easier to read
6: perl misc/cronjobs/overdue_notices.pl -v -v
7: All the info, but nicer to read

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Katrin Fischer 2022-10-08 11:39:46 UTC
I really like the improved output, but -v and -v -v lead to the same result for me. Also, if they are supposed to make a difference, this should be advertised when running -h on the script.

I personally don't miss the SQL :)
Comment 6 Nick Clemens (kidclamp) 2022-10-12 13:12:13 UTC
Created attachment 141726 [details] [review]
Bug 28555: (follow-up) Make verbose count flags passed
Comment 7 Katrin Fischer 2022-10-15 22:35:46 UTC
The output works now, but I still miss documentation, so this is something people can find:


--verbose | -v                  Verbose mode

-v | --verbose
         Verbose. Without this flag set, only fatal errors are reported.
Comment 8 Nick Clemens (kidclamp) 2022-10-17 17:17:48 UTC
Created attachment 142001 [details] [review]
Bug 28555: (follow-up) Add to script documenation
Comment 9 Katrin Fischer 2022-10-17 19:06:30 UTC
Created attachment 142016 [details] [review]
Bug 28555: Improve logging for overdue_notices.pl

Currenlty the output with -v from overdue_notices is a bit overwhelming and hard to parse

I do a few things here:
1 - Only show SQL if verbose > 1
2 - Add some separators to make it more readab;e
3 - Remove some redundant messages with branchcode and borrowernumber

To test:
1: perl misc/cronjobs/overdue_notices.pl -v
2: Notice you get a LOT of information all smushed together
3: Apply patch
4: perl misc/cronjobs/overdue_notices.pl -v
5: Less info, and easier to read
6: perl misc/cronjobs/overdue_notices.pl -v -v
7: All the info, but nicer to read

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2022-10-17 19:06:36 UTC
Created attachment 142017 [details] [review]
Bug 28555: (follow-up) Make verbose count flags passed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2022-10-17 19:06:42 UTC
Created attachment 142018 [details] [review]
Bug 28555: (follow-up) Add to script documenation

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2022-10-17 19:06:55 UTC
Very nice, thank you!
Comment 13 Tomás Cohen Arazi 2022-10-18 00:15:30 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!