Bug 28555 - Improve output of verbose option for overdue_notices.pl
Summary: Improve output of verbose option for overdue_notices.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Nick Clemens
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-11 14:59 UTC by Nick Clemens
Modified: 2023-12-28 20:43 UTC (History)
2 users (show)

See Also:
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 (3.99 KB, patch)
2021-06-11 15:15 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 28555: Improve logging for overdue_notices.pl (3.69 KB, patch)
2022-04-27 15:13 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 28555: Improve logging for overdue_notices.pl (3.74 KB, patch)
2022-09-25 04:45 UTC, David Nind
Details | Diff | Splinter Review
Bug 28555: (follow-up) Make verbose count flags passed (848 bytes, patch)
2022-10-12 13:12 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 28555: (follow-up) Add to script documenation (1.33 KB, patch)
2022-10-17 17:17 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 28555: Improve logging for overdue_notices.pl (3.80 KB, patch)
2022-10-17 19:06 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28555: (follow-up) Make verbose count flags passed (905 bytes, patch)
2022-10-17 19:06 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28555: (follow-up) Add to script documenation (1.38 KB, patch)
2022-10-17 19:06 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 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 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 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 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!