Dancer2::Logger::Multiplex - Log to multiple Dancer2::Logger engines
version 0.02
use Dancer2::Logger::Multiplex;
Implements a multiplexing logger engine to dispatch logs to multiple backend Dancer2::Core::Role::Logger engines.
Writes the log message to multiple logger engines.
The setting logger should be set to Multiplex in order to use this logging engine in a Dancer2 application.
Multiplex
Below is a sample configuration:
logger: "Multiplex" engines: logger: Multiplex: loggers: - Console - File - Fluent File: log_dir: "/var/log/myapp" file_name: "myapp.log" Fluent: tag_prefix: "myapp" host: "127.0.0.1" port: 24224
Allowed options are as follows:
Specifies the list of Dancer2::Core::Role::Logger backend engines to dispatch log messages to.
Each logger engine will be initialized with their corresponding configurations. As such, in the example above, Dancer2::Logger::File will be initialized with settings for log_dir and file_name, while Dancer2::Logger::Fluent will be initialized with settings for tag_prefix, host, and port as specified in the sample configuration.
Arnold Tan Casis <atancasis@cpan.org>
Copyright 2017- Arnold Tan Casis
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See Dancer2 for details about logging in route handlers.
To install Dancer2::Logger::Multiplex, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dancer2::Logger::Multiplex
CPAN shell
perl -MCPAN -e shell install Dancer2::Logger::Multiplex
For more information on module installation, please visit the detailed CPAN module installation guide.