Bug 16436

Summary: Allow action logs to be logged to the koha log file
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: Architecture, internals, and plumbingAssignee: Kyle M Hall (khall) <kyle>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: f.demians, jonathan.druart
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20956
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 23896    
Attachments: Bug 16436 - Allow action logs to be logged to the koha log file
Bug 16436 - Allow action logs to be logged to the koha log file
Bug 16436 - Allow action logs to be logged to the koha log file
Bug 16436 - Allow action logs to be logged to the koha log file
[SIGNED-OFF] Bug 16436 - Allow action logs to be logged to the koha log file
Bug 16436 [QA Followup] - Use debug instead of info
Bug 16436 - Allow action logs to be logged to the koha log file
Bug 16436 [QA Followup] - Use debug instead of info

Description Kyle M Hall (khall) 2016-05-03 18:58:44 UTC
It would be very useful if it were possible to log actions to a log file as well as to the database. With Koha::Logger we can give the option of sending those logs to a separate file, but by default they can go to the standard log files. They should also be off by default.
Comment 1 Kyle M Hall (khall) 2016-05-03 19:02:04 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall (khall) 2016-05-03 19:06:24 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall (khall) 2016-05-03 19:16:27 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall (khall) 2016-05-04 10:00:42 UTC Comment hidden (obsolete)
Comment 5 Srdjan Jankovic 2016-06-01 02:15:03 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2016-06-12 11:56:40 UTC
How this can be useful for a library?
Should not we use DEBUG instead of INFO?
Comment 7 Kyle M Hall (khall) 2016-07-06 12:50:43 UTC Comment hidden (obsolete)
Comment 8 Kyle M Hall (khall) 2016-07-06 12:51:37 UTC
(In reply to Jonathan Druart from comment #6)
> How this can be useful for a library?
> Should not we use DEBUG instead of INFO?

That works for me!
Comment 9 Jonathan Druart 2016-07-06 13:58:18 UTC
(In reply to Kyle M Hall from comment #8)
> (In reply to Jonathan Druart from comment #6)
> > How this can be useful for a library?
> > Should not we use DEBUG instead of INFO?
> 
> That works for me!

And, how this can be useful for a library?
What's the use case?
Comment 10 Kyle M Hall (khall) 2016-07-06 14:34:18 UTC
(In reply to Jonathan Druart from comment #9)
> (In reply to Kyle M Hall from comment #8)
> > (In reply to Jonathan Druart from comment #6)
> > > How this can be useful for a library?
> > > Should not we use DEBUG instead of INFO?
> > 
> > That works for me!
> 
> And, how this can be useful for a library?
> What's the use case?

The use case would be for a way to 'archive' action logs outside of the database. With the logger, we can even redirect those specific logs to other files. For development and debugging, it's helpful to see the actions in the context of the rest of the debugging output.
Comment 11 Jonathan Druart 2016-08-02 09:47:00 UTC
Created attachment 53876 [details] [review]
Bug 16436 - Allow action logs to be logged to the koha log file

Test Plan:
1) Ensure that your Koha::Logger configuration is in good working order
2) Apply this patch
3) Modify the first line of your log4perl.conf file from:
    log4perl.logger.intranet = WARN, INTRANET
   to
    log4perl.logger.intranet = INFO, INTRANET
4) Change a system preference setting
5) Note the new line in your log file!

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Jonathan Druart 2016-08-02 09:47:03 UTC
Created attachment 53877 [details] [review]
Bug 16436 [QA Followup] - Use debug instead of info

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 13 Kyle M Hall (khall) 2016-08-02 10:21:03 UTC
Pushed to master for 16.11!
Comment 14 Frédéric Demians 2016-08-05 06:06:29 UTC
Pushed in 16.05. Will be in 16.05.03.