version 0.9911
Dancer2::Logger::LogAny - Use Log::Any to log from your Dancer2 app
This module implements a Dancer2 logging engine using Log::Any. You can then use any Log::Any::Adapter-based output class on the backend.
Log::Any
Log::Any::Adapter
In your Dancer2 config:
logger: LogAny engines: logger: LogAny: category: Important Messages logger: - Stderr - newline - 1
If you omit the category setting, Log::Any::Adapter will use the name of this class as the category.
The above is a simple configuration example. For a complete working example app, logging to two different Log::Dispatch output engines, see the example/ directory in this module's distribution.
Log::Dispatch
example/
This is the function required by Dancer2::Core::Role::Logger
Dancer2::Core::Role::Logger
Log::Any, Log::Any::Adapter, Dancer2::Core::Role::Logger
Nick Tonkin <tonkin@cpan.org>
This software is copyright (c) 2017 by Nick Tonkin.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Dancer2::Logger::LogAny, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dancer2::Logger::LogAny
CPAN shell
perl -MCPAN -e shell install Dancer2::Logger::LogAny
For more information on module installation, please visit the detailed CPAN module installation guide.