File Coverage

blib/lib/Dancer2/Logger/Console.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Dancer2::Logger::Console;
2             # ABSTRACT: Console logger
3             $Dancer2::Logger::Console::VERSION = '1.0.0';
4 63     63   124129 use Moo;
  63         7318  
  63         457  
5              
6             with 'Dancer2::Core::Role::Logger';
7              
8             sub log {
9             my ( $self, $level, $message ) = @_;
10             print STDERR $self->format_message( $level => $message );
11             }
12              
13             1;
14              
15             __END__
16              
17             =pod
18              
19             =encoding UTF-8
20              
21             =head1 NAME
22              
23             Dancer2::Logger::Console - Console logger
24              
25             =head1 VERSION
26              
27             version 1.0.0
28              
29             =head1 DESCRIPTION
30              
31             This is a logging engine that allows you to print debug messages on the
32             standard error output.
33              
34             =head1 METHODS
35              
36             =head2 log
37              
38             Writes the log message to the console.
39              
40             =head1 CONFIGURATION
41              
42             The setting C<logger> should be set to C<console> in order to use this logging
43             engine in a Dancer2 application.
44              
45             There is no additional setting available with this engine.
46              
47             =head1 SEE ALSO
48              
49             L<Dancer2::Core::Role::Logger>
50              
51             =head1 AUTHOR
52              
53             Dancer Core Developers
54              
55             =head1 COPYRIGHT AND LICENSE
56              
57             This software is copyright (c) 2023 by Alexis Sukrieh.
58              
59             This is free software; you can redistribute it and/or modify it under
60             the same terms as the Perl 5 programming language system itself.
61              
62             =cut