File Coverage

blib/lib/Dancer2/Logger/Note.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Dancer2::Logger::Note;
2             # ABSTRACT: Test::More note() logging engine for Dancer2
3             $Dancer2::Logger::Note::VERSION = '0.400001';
4 80     80   41551 use Moo;
  80         205  
  80         510  
5 80     80   30221 use Test::More;
  80         125574  
  80         1282  
6              
7             with 'Dancer2::Core::Role::Logger';
8              
9             sub log {
10             my ( $self, $level, $message ) = @_;
11              
12             Test::More::note( $self->format_message( $level => $message ) );
13             }
14              
15             1;
16              
17             __END__
18              
19             =pod
20              
21             =encoding UTF-8
22              
23             =head1 NAME
24              
25             Dancer2::Logger::Note - Test::More note() logging engine for Dancer2
26              
27             =head1 VERSION
28              
29             version 0.400001
30              
31             =head1 DESCRIPTION
32              
33             This logging engine uses L<Test::More>'s note() to output as TAP comments.
34              
35             This is very useful in case you're writing a test and want to have logging
36             messages as part of your TAP.
37              
38             "Like C<diag()>, except the message will not be seen when the test is run in a
39             harness. It will only be visible in the verbose TAP stream." -- Test::More.
40              
41             =head1 METHODS
42              
43             =head2 log
44              
45             Use Test::More's note() to output the log message.
46              
47             =head1 AUTHOR
48              
49             Dancer Core Developers
50              
51             =head1 COPYRIGHT AND LICENSE
52              
53             This software is copyright (c) 2023 by Alexis Sukrieh.
54              
55             This is free software; you can redistribute it and/or modify it under
56             the same terms as the Perl 5 programming language system itself.
57              
58             =cut