Bug 38818 - Add diag option to t::lib::Mocks::Logger
Summary: Add diag option to t::lib::Mocks::Logger
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Martin Renvoize (ashimema)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 38689
  Show dependency treegraph
 
Reported: 2025-01-03 14:39 UTC by Martin Renvoize (ashimema)
Modified: 2025-01-13 09:20 UTC (History)
4 users (show)

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


Attachments
Bug 38818: Add diag option to t::lib::Mocks::Logger (1.29 KB, patch)
2025-01-03 14:41 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38818: Add diag option to t::lib::Mocks::Logger (2.41 KB, patch)
2025-01-03 16:09 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38818: Add diag option to t::lib::Mocks::Logger (2.41 KB, patch)
2025-01-03 16:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38818: Add diag option to t::lib::Mocks::Logger (2.48 KB, patch)
2025-01-10 17:57 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 2025-01-03 14:39:10 UTC
The logger testing module is handy, but having a diag option to output all log lines currently sitting in the logger object would be helpful.

This would aid in later debugging.
Comment 1 Martin Renvoize (ashimema) 2025-01-03 14:41:16 UTC
Created attachment 176120 [details] [review]
Bug 38818: Add diag option to t::lib::Mocks::Logger

This patch adds a diag method to the Mocks::Logger object. This aids in
debugging logging errors by simply outputting all log lines to screen in
a diag statement.
Comment 2 Martin Renvoize (ashimema) 2025-01-03 16:09:21 UTC
Created attachment 176125 [details] [review]
Bug 38818: Add diag option to t::lib::Mocks::Logger

This patch adds a diag method to the Mocks::Logger object. This aids in
debugging logging errors by simply outputting all log lines to screen in
a diag statement.
Comment 3 Martin Renvoize (ashimema) 2025-01-03 16:35:08 UTC
Created attachment 176126 [details] [review]
Bug 38818: Add diag option to t::lib::Mocks::Logger

This patch adds a diag method to the Mocks::Logger object. This aids in
debugging logging errors by simply outputting all log lines to screen in
a diag statement.
Comment 4 Martin Renvoize (ashimema) 2025-01-03 16:36:55 UTC
This is tested nicely using bug 38689.. just uncomment the `#$logger->debug()` lines added to the unit tests in that bug and run the tests to see the pretty output this produces
Comment 5 Kyle M Hall (khall) 2025-01-10 17:57:09 UTC
Created attachment 176385 [details] [review]
Bug 38818: Add diag option to t::lib::Mocks::Logger

This patch adds a diag method to the Mocks::Logger object. This aids in
debugging logging errors by simply outputting all log lines to screen in
a diag statement.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>