Bug 16436 - Allow action logs to be logged to the koha log file
Summary: Allow action logs to be logged to the koha log file
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 23896
  Show dependency treegraph
 
Reported: 2016-05-03 18:58 UTC by Kyle M Hall
Modified: 2023-07-11 13:13 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
Bug 16436 - Allow action logs to be logged to the koha log file (1.39 KB, patch)
2016-05-03 19:02 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16436 - Allow action logs to be logged to the koha log file (1.40 KB, patch)
2016-05-03 19:06 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16436 - Allow action logs to be logged to the koha log file (3.20 KB, patch)
2016-05-03 19:16 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16436 - Allow action logs to be logged to the koha log file (3.46 KB, patch)
2016-05-04 10:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16436 - Allow action logs to be logged to the koha log file (3.51 KB, patch)
2016-06-01 02:15 UTC, Srdjan Jankovic
Details | Diff | Splinter Review
Bug 16436 [QA Followup] - Use debug instead of info (630 bytes, patch)
2016-07-06 12:50 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16436 - Allow action logs to be logged to the koha log file (3.58 KB, patch)
2016-08-02 09:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16436 [QA Followup] - Use debug instead of info (703 bytes, patch)
2016-08-02 09:47 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 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 2016-05-03 19:02:04 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2016-05-03 19:06:24 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2016-05-03 19:16:27 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 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 2016-07-06 12:50:43 UTC Comment hidden (obsolete)
Comment 8 Kyle M Hall 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 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 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.