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