https://github.com/bleargh45/log-dispatch-testdiag
Log to Test::More's diagnostic output
https://github.com/bleargh45/log-dispatch-testdiag
log-dispatch test-anything-protocol
Last synced: 4 months ago
JSON representation
Log to Test::More's diagnostic output
- Host: GitHub
- URL: https://github.com/bleargh45/log-dispatch-testdiag
- Owner: bleargh45
- Created: 2021-01-12T18:08:44.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-02-04T00:39:50.000Z (over 1 year ago)
- Last Synced: 2025-03-23T21:46:07.571Z (about 1 year ago)
- Topics: log-dispatch, test-anything-protocol
- Language: Perl
- Homepage: http://metacpan.org/release/Log-Dispatch-TestDiag/
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
# NAME
Log::Dispatch::TestDiag - Log to Test::More's diagnostic output
# SYNOPSIS
```perl
use Log::Dispatch;
my $logger = Log::Dispatch->new(
outputs => [
['TestDiag', min_level=>'debug', as_note=>0],
],
);
```
# DESCRIPTION
This module provides a `Log::Dispatch` output that spits the logged records out
using `Test::More`'s diagnostic output.
# METHODS
- new()
Constructs a new `Log::Dispatch::TestDiag` object and returns it to the caller.
Accepts standard `Log::Dispatch::Output` parameters (e.g. `min_level`).
Also accepts an optional "`as_note`" parameter, to indicate that output should
be sent via `Test::More::note()` instead of `Test::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.
# AUTHOR
Graham TerMarsch (cpan@howlingfrog.com)
# COPYRIGHT
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.
# SEE ALSO
- [Log::Dispatch](https://metacpan.org/pod/Log%3A%3ADispatch)