| 1 |
package Dancer2::Logger::Console; |
| 2 |
# ABSTRACT: Console logger |
| 3 |
$Dancer2::Logger::Console::VERSION = '2.2.2'; |
| 4 |
use Moo; |
| 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 2.2.2 |
| 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) 2026 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 |