- SEE ALSO
Dancer2::Logger::Multiplex - Log to multiple Dancer2::Logger engines
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.
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 <firstname.lastname@example.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.