Dancer::Logger::LogReport3pm
Reroute dancer logs into log::report
Usage
# When your main program is not a Dancer objectuse My::Dancer::App;use Log::Report;... start dispatcher ...error "something is wrong"; # Log::Report::error()# When your main program is a Dancer objectuse Dancer;use Dancer::Logger::LogReport;use Log::Report import => 'dispatcher';... start dispatcher ...error "something is wrong"; # Dancer::error()# In any case, your main program needs to start log dispatcers# Both Dancer and other Log::Report based modules will send# their messages here:dispatcher FILE => 'default', ...;# In your configlogger: log_reportlogger_format: %i%m # keep it simplelog: debug # filtered by dispatchers
Inheritance
Dancer::Logger::LogReportis a Dancer::Logger::AbstractDancer::Logger::LogReportis an Exporter
Overview
The Log::Report exception/translation framework defines a large number of logging back-ends. The same log messages can be sent to multiple destinations at the same time via flexible dispatchers. When you use this logger in your Dancer application, it will nicely integrate with non-Dancer modules which need logging.
Many log back-ends, like syslog, have more levels of system messages. Modules who explicitly load this module can use the missing "assert", "notice", "panic", and "alert" log levels. The "trace" name is provided as well: when you are debugging, you add a 'trace' to your program... its just a better name than 'debug'.
You probably want to set a very simple "logger_format", because the dispatchers do already add some of the fields that the default "simple" format adds. For instance, to get the filename/line-number in messages depends on the dispatcher 'mode' (f.i. 'DEBUG').
You also want to set the log level to "debug", because level filtering is controlled per dispatcher (as well)
Releases
5 releases since Debian 9 (Stretch); the text changed 4 times.