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 = '1.0.0'; |
4
|
81
|
|
|
81
|
|
42918
|
use Moo; |
|
81
|
|
|
|
|
240
|
|
|
81
|
|
|
|
|
522
|
|
5
|
81
|
|
|
81
|
|
30593
|
use Test::More; |
|
81
|
|
|
|
|
129233
|
|
|
81
|
|
|
|
|
1565
|
|
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 1.0.0 |
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 |