.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Dancer2::Logger::LogReport 3pm" .TH Dancer2::Logger::LogReport 3pm "2023-10-29" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Dancer2::Logger::LogReport \- reroute Dancer2 logs into Log::Report .SH "INHERITANCE" .IX Header "INHERITANCE" .Vb 2 \& Dancer2::Logger::LogReport \& is a Moo::Object .Ve .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& # This module is loaded when configured. It does not provide \& # end\-user functions or methods. \& \& # See DETAILS .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" [The Dancer2 plugin was contributed by Andrew Beverley] .PP This logger allows the use of the many logging backends available in Log::Report. It will process all of the Dancer2 log messages, and also allow any other module to use the same logging facilities. The same log messages can be sent to multiple destinations at the same time via flexible dispatchers. .PP If using this logger, you may also want to use Dancer2::Plugin::LogReport .PP Many log back-ends, like syslog, have more levels of system messages. Modules who explicitly load this module can use the missing \f(CW\*(C`assert\*(C'\fR, \&\f(CW\*(C`notice\*(C'\fR, \f(CW\*(C`panic\*(C'\fR, and \f(CW\*(C`alert\*(C'\fR log levels. The \f(CW\*(C`trace\*(C'\fR name is provided as well: when you are debugging, you add a 'trace' to your program... it's just a better name than 'debug'. You will need to load Log::Report in order to use the additional levels; if doing so directly within a Dancer2 application (not a sub-module), then you will either need to load Log::Report with \f(CW\*(C`syntax, \*(AqLONG\*(Aq\*(C'\fR or use Dancer2::Plugin::LogReport to prevent namespace clashes. .SS "Log Format" .IX Subsection "Log Format" If using this module on its own (such as a drop-in replacement for Dancer2::Logger::Syslog), then the logging format is configured as with any other Dancer logger. If using this module with Dancer2::Plugin::LogReport, then log_format is ignored and messages are not formatted, in order to keep the message format consistent regardless of where the message was generated (be it another module using Log::Report, the plugin, or Dancer itself). In this case, the log format should be configured using the applicable dispatcher (such as Log::Report::Dispatcher::Syslog::new(format)). .PP If also using with the Log::Report logging functions, then you probably want to set a very simple \f(CW\*(C`logger_format\*(C'\fR, because the dispatchers do already add some of the fields that the default \f(CW\*(C`simple\*(C'\fR format adds. For instance, to get the filename/line\-number in messages depends on the dispatcher 'mode' (f.i. \&'\s-1DEBUG\s0'). .PP You also want to set the Dancer2 log level to \f(CW\*(C`debug\*(C'\fR, because level filtering is controlled per dispatcher (as well). .PP See \*(L"\s-1DETAILS\*(R"\s0 in Dancer2::Plugin::LogReport for examples. .SH "METHODS" .IX Header "METHODS" .ie n .IP "$obj\->\fBlog\fR($level, $params)" 4 .el .IP "\f(CW$obj\fR\->\fBlog\fR($level, \f(CW$params\fR)" 4 .IX Item "$obj->log($level, $params)" .SH "SEE ALSO" .IX Header "SEE ALSO" This module is part of Log-Report distribution version 1.36, built on October 27, 2023. Website: \fIhttp://perl.overmeer.net/CPAN/\fR .SH "LICENSE" .IX Header "LICENSE" Copyrights 2007\-2023 by [Mark Overmeer ]. For other contributors see ChangeLog. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See \fIhttp://dev.perl.org/licenses/\fR