Bugzilla – Attachment 176120 Details for
Bug 38818
Add diag option to t::lib::Mocks::Logger
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38818: Add diag option to t::lib::Mocks::Logger
Bug-38818-Add-diag-option-to-tlibMocksLogger.patch (text/plain), 1.29 KB, created by
Martin Renvoize (ashimema)
on 2025-01-03 14:41:16 UTC
(
hide
)
Description:
Bug 38818: Add diag option to t::lib::Mocks::Logger
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-01-03 14:41:16 UTC
Size:
1.29 KB
patch
obsolete
>From 942a6fd012e764ab9a56f27991e5fe197f5eea5a Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 3 Jan 2025 14:39:29 +0000 >Subject: [PATCH] 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. >--- > t/lib/Mocks/Logger.pm | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > >diff --git a/t/lib/Mocks/Logger.pm b/t/lib/Mocks/Logger.pm >index 22c967a58c6..14504ba65fb 100644 >--- a/t/lib/Mocks/Logger.pm >+++ b/t/lib/Mocks/Logger.pm >@@ -81,6 +81,26 @@ sub new { > return $self; > } > >+=head3 diag >+ >+ $logger->diag(); >+ >+Method to output all recieved logs. >+ >+=cut >+ >+sub diag { >+ my ($self) = @_; >+ my $tb = $CLASS->builder; >+ $tb->diag("debug: \n " . join("\n ", @{ $self->{debug} })); >+ $tb->diag("error: \n " . join("\n ", @{ $self->{error} })); >+ $tb->diag("into: \n " . join("\n ", @{ $self->{info} })); >+ $tb->diag("fatal: \n " . join("\n ", @{ $self->{fatal} })); >+ $tb->diag("trace: \n " . join("\n ", @{ $self->{trace} })); >+ $tb->diag("warn: \n " . join("\n ", @{ $self->{warn} })); >+ return; >+} >+ > =head3 debug_is > > $logger->debug_is($expected); >-- >2.47.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38818
:
176120
|
176125
|
176126
|
176385