Log::Dispatch::TestDiag - Log to Test::More's diagnostic output
use Log::Dispatch;
my $logger = Log::Dispatch->new(
outputs => [
['TestDiag', min_level=>'debug', as_note=>0],
],
);
This module provides a Log::Dispatch
output that spits the logged records out
using Test::More
's diagnostic output.
-
new()
Constructs a new
Log::Dispatch::TestDiag
object and returns it to the caller. Accepts standardLog::Dispatch::Output
parameters (e.g.min_level
).Also accepts an optional "
as_note
" parameter, to indicate that output should be sent viaTest::More::note()
instead ofTest::More::diag()
. Difference is that a "note" only appears in the verbose TAP stream and does not get shown when running under a test harness. -
log_message(%p)
Logs the given message.
Graham TerMarsch (cpan@howlingfrog.com)
Copyright (C) 2011, Graham TerMarsch. All Rights Reserved.
This is free software, you can redistribute it and/or modify it under the Artistic-2.0 license.