Bug 12855

Summary: Scripts that support logging should enable logging by default
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: PackagingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: katrin.fischer, robin
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12902
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 14167    
Bug Blocks:    

Description Martin Renvoize 2014-09-01 10:58:51 UTC
It's only when somthing goes wrong that you tend to start looking for the logs.. so logging should be set at a sensible level by default.

For instance, the fines.pl script supports logging but it is disabled by default. I believe this is wrong, logs should be enabled, directed to /var/log/koha/instance whatever and logrotate used to manage them.
Comment 1 Katrin Fischer 2014-09-01 17:47:48 UTC
Hm, I think I disagree and the logging had been turned off by intention. I think we shouldn't put files with patron sensitive information on the server by default, when the library might not be aware of it. It should be opt in... not opt out.
Comment 2 Katrin Fischer 2014-09-01 17:49:46 UTC
Hm, also there is logging on the database side if you have FinesLog activated.
Comment 3 Robin Sheat 2014-09-01 23:06:26 UTC
Logging should be set up like most things do it: errors, warnings, info, debug levels. 

My suggestion is that default, errors (and warnings?) are logged, however are checked to ensure that they won't divulge sensitive information, but is able to give you a heads-up to say that something might need checking out.

Also, they should use something like Log::Any or Log4Perl to do it properly, none of this spamming syserr/sysout like some scripts do.
Comment 4 Katrin Fischer 2014-09-02 04:43:47 UTC
Hi Robin, makes sense to me.
Comment 5 Katrin Fischer 2023-07-15 21:11:04 UTC
I wonder if this should be rephrased and what would be a next step here?