The logging for this cronjob is a bit overwhelming To recreate: perl misc/cronjobs/overdue_notices.pl -v
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
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
rebased for current master
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>
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 :)
Created attachment 141726 [details] [review] Bug 28555: (follow-up) Make verbose count flags passed
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.
Created attachment 142001 [details] [review] Bug 28555: (follow-up) Add to script documenation
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>
Created attachment 142017 [details] [review] Bug 28555: (follow-up) Make verbose count flags passed Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 142018 [details] [review] Bug 28555: (follow-up) Add to script documenation Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Very nice, thank you!
Pushed to master for 22.11. Nice work everyone, thanks!