1Dancer2::Logger::LogRepUosretr(3C)ontributed Perl DocumeDnatnacteiro2n::Logger::LogReport(3)
2
3
4

NAME

6       Dancer2::Logger::LogReport - reroute Dancer2 logs into Log::Report
7

INHERITANCE

9        Dancer2::Logger::LogReport
10          is a Moo::Object
11

SYNOPSIS

13         # This module is loaded when configured.  It does not provide
14         # end-user functions or methods.
15
16         # See DETAILS
17

DESCRIPTION

19       [The Dancer2 plugin was contributed by Andrew Beverley]
20
21       This logger allows the use of the many logging backends available in
22       Log::Report.  It will process all of the Dancer2 log messages, and also
23       allow any other module to use the same logging facilities. The same log
24       messages can be sent to multiple destinations at the same time via
25       flexible dispatchers.
26
27       If using this logger, you may also want to use
28       Dancer2::Plugin::LogReport
29
30       Many log back-ends, like syslog, have more levels of system messages.
31       Modules who explicitly load this module can use the missing "assert",
32       "notice", "panic", and "alert" log levels.  The "trace" name is
33       provided as well: when you are debugging, you add a 'trace' to your
34       program... it's just a better name than 'debug'. You will need to load
35       Log::Report in order to use the additional levels; if doing so directly
36       within a Dancer2 application (not a sub-module), then you will either
37       need to load Log::Report with "syntax, 'LONG'" or use
38       Dancer2::Plugin::LogReport to prevent namespace clashes.
39
40   Log Format
41       If using this module on its own (such as a drop-in replacement for
42       Dancer2::Logger::Syslog), then the logging format is configured as with
43       any other Dancer logger. If using this module with
44       Dancer2::Plugin::LogReport, then log_format is ignored and messages are
45       not formatted, in order to keep the message format consistent
46       regardless of where the message was generated (be it another module
47       using Log::Report, the plugin, or Dancer itself). In this case, the log
48       format should be configured using the applicable dispatcher (such as
49       Log::Report::Dispatcher::Syslog::new(format)).
50
51       If also using with the Log::Report logging functions, then you probably
52       want to set a very simple "logger_format", because the dispatchers do
53       already add some of the fields that the default "simple" format adds.
54       For instance, to get the filename/line-number in messages depends on
55       the dispatcher 'mode' (f.i.  'DEBUG').
56
57       You also want to set the Dancer2 log level to "debug", because level
58       filtering is controlled per dispatcher (as well).
59
60       See "DETAILS" in Dancer2::Plugin::LogReport for examples.
61

METHODS

63       $obj->log($level, $params)
64

SEE ALSO

66       This module is part of Log-Report distribution version 1.33, built on
67       July 17, 2021. Website: http://perl.overmeer.net/CPAN/
68

LICENSE

70       Copyrights 2007-2021 by [Mark Overmeer <markov@cpan.org>]. For other
71       contributors see ChangeLog.
72
73       This program is free software; you can redistribute it and/or modify it
74       under the same terms as Perl itself.  See http://dev.perl.org/licenses/
75
76
77
78perl v5.34.0                      2022-01-21     Dancer2::Logger::LogReport(3)
Impressum