Bug 12855 - Scripts that support logging should enable logging by default
Summary: Scripts that support logging should enable logging by default
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 14167
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-01 10:58 UTC by Martin Renvoize
Modified: 2019-04-10 11:01 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

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