Bug 34271

Summary: Remove a few Logger statements from REST API
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Architecture, internals, and plumbingAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: minor    
Priority: P5 - low CC: dcook, fridolin.somers, martin.renvoize, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.05,22.11.12
Circulation function:
Bug Depends on: 22678    
Bug Blocks:    
Attachments: Bug 34271: Remove a few Logger statements from REST API
Bug 34271: Remove a few Logger statements from REST API
Bug 34271: Remove a few Logger statements from REST API

Description Marcel de Rooy 2023-07-13 14:02:29 UTC
See 22678
Comment 1 Marcel de Rooy 2023-07-13 14:27:46 UTC
Created attachment 153399 [details] [review]
Bug 34271: Remove a few Logger statements from REST API

See also bug 22678.
We should call app->log->warn, ->debug, etc. instead of Logger.

Test plan:
The simplest way I tested V1, is add a app->log->warn in the try
blocks, restart all and check that your log4perl is set correctly
too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2023-09-02 13:48:33 UTC
David, could you add your signoff here please?
Comment 3 David Cook 2023-09-08 06:53:19 UTC
Ok so I tested Koha/REST/V1.pm by manually adding "die" into the try blocks and I confirmed the logging change worked.

Koha/REST/V1/OAuth/Client.pm is a bit more elaborate, so I'm going to eyeball that one. The change to Koha/REST/V1.pom confirms that the syntax works correctly, so all good to me.
Comment 4 David Cook 2023-09-08 06:54:14 UTC
Created attachment 155359 [details] [review]
Bug 34271: Remove a few Logger statements from REST API

See also bug 22678.
We should call app->log->warn, ->debug, etc. instead of Logger.

Test plan:
The simplest way I tested V1, is add a app->log->warn in the try
blocks, restart all and check that your log4perl is set correctly
too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 5 Martin Renvoize (ashimema) 2023-10-17 12:32:34 UTC
Created attachment 157236 [details] [review]
Bug 34271: Remove a few Logger statements from REST API

See also bug 22678.
We should call app->log->warn, ->debug, etc. instead of Logger.

Test plan:
The simplest way I tested V1, is add a app->log->warn in the try
blocks, restart all and check that your log4perl is set correctly
too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize (ashimema) 2023-10-17 12:33:05 UTC
Great to see this worked through, thanks.

No regressions found, QA scripts happy.

Passing QA
Comment 7 Tomás Cohen Arazi (tcohen) 2023-10-18 13:26:26 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 8 Fridolin Somers 2023-10-25 07:31:16 UTC
Pushed to 23.05.x for 23.05.05
Comment 9 Matt Blenkinsop 2023-11-13 14:03:19 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x