Bug 23896 - logaction should pass the correct interface to Koha::Logger
Summary: logaction should pass the correct interface to Koha::Logger
Status: Pushed to oldoldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on: 16436
Blocks:
  Show dependency treegraph
 
Reported: 2019-10-25 08:48 UTC by Marcel de Rooy
Modified: 2020-02-18 00:50 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.03, 19.05.08, 18.11.14


Attachments
Bug 23896: logaction should pass the correct interface to Koha::Logger (812 bytes, patch)
2019-10-25 09:05 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 23896: Add unit tests (1.50 KB, patch)
2019-10-25 09:05 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 23896: logaction should pass the correct interface to Koha::Logger (983 bytes, patch)
2019-10-25 09:17 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 23896: logaction should pass the correct interface to Koha::Logger (1008 bytes, patch)
2020-01-29 13:35 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23896: logaction should pass the correct interface to Koha::Logger (1.06 KB, patch)
2020-01-29 14:51 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 Marcel de Rooy 2019-10-25 08:48:08 UTC
Look at
    my $logger = Koha::Logger->get(
        {
            interface => 'intranet',

while we have
 $interface //= C4::Context->interface;
Comment 1 Marcel de Rooy 2019-10-25 08:55:04 UTC Comment hidden (obsolete)
Comment 2 Marcel de Rooy 2019-10-25 09:05:25 UTC Comment hidden (obsolete)
Comment 3 Marcel de Rooy 2019-10-25 09:05:29 UTC Comment hidden (obsolete)
Comment 4 Marcel de Rooy 2019-10-25 09:12:36 UTC
(In reply to Marcel de Rooy from comment #1)
> Will add a test for it, but building it on top of work in 21190

Well, I think I skip a test here. We need to mock AUTOLOAD in Koha::Logger and similar horrible stuff to just check a trivial parameter. Out of balance. No test is just easier.
Comment 5 Marcel de Rooy 2019-10-25 09:17:22 UTC
Created attachment 94721 [details] [review]
Bug 23896: logaction should pass the correct interface to Koha::Logger

Trivial fix.

Test plan:
Run t/db../Log.t to ensure that we did not break stuff.
If you set opac to debug in log4perl config, inspect opac-error.log to see
if you have extra loglines from running the test script.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Marcel de Rooy 2020-01-29 13:12:37 UTC
This is a trivial oneliner patch and I waited three months for a signoff without any response. Taking the liberty to switch it to Signed off myself.
Comment 7 Jonathan Druart 2020-01-29 13:32:57 UTC
Please cover this change with a test :)
Comment 8 Martin Renvoize 2020-01-29 13:35:57 UTC
Created attachment 98080 [details] [review]
Bug 23896: logaction should pass the correct interface to Koha::Logger

Trivial fix.

Test plan:
Run t/db../Log.t to ensure that we did not break stuff.
If you set opac to debug in log4perl config, inspect opac-error.log to see
if you have extra loglines from running the test script.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Marcel de Rooy 2020-01-29 14:04:34 UTC
(In reply to Jonathan Druart from comment #7)
> Please cover this change with a test :)

IRC:
[14:36] <marcelr> did you see comment4 on the report btw? it justifies the absence of a test
[14:37] <marcelr> i considered it as out of balance
Comment 10 Jonathan Druart 2020-01-29 14:51:13 UTC
Created attachment 98085 [details] [review]
Bug 23896: logaction should pass the correct interface to Koha::Logger

Trivial fix.

Test plan:
Run t/db../Log.t to ensure that we did not break stuff.
If you set opac to debug in log4perl config, inspect opac-error.log to see
if you have extra loglines from running the test script.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Martin Renvoize 2020-01-30 11:03:59 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 12 Joy Nelson 2020-02-10 23:23:44 UTC
Pushed to 19.11.x branch for 19.11.03
Comment 13 Lucas Gass 2020-02-14 20:37:48 UTC
backported to 19.05.x for 19.05.08
Comment 14 Hayley Mapley 2020-02-18 00:50:31 UTC
Backported to 18.11.x for 18.11.14.