.\" 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 "Dancer::Logger::LogReport 3pm" .TH Dancer::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" Dancer::Logger::LogReport \- reroute Dancer logs into Log::Report .SH "INHERITANCE" .IX Header "INHERITANCE" .Vb 2 \& Dancer::Logger::LogReport \& is a Dancer::Logger::Abstract \& \& Dancer::Logger::LogReport \& is an Exporter .Ve .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 5 \& # When your main program is not a Dancer object \& use My::Dancer::App; \& use Log::Report; \& ... start dispatcher ... \& error "something is wrong"; # Log::Report::error() \& \& # When your main program is a Dancer object \& use Dancer; \& use Dancer::Logger::LogReport; \& use Log::Report import => \*(Aqdispatcher\*(Aq; \& ... 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 => \*(Aqdefault\*(Aq, ...; \& \& # In your config \& logger: log_report \& logger_format: %i%m # keep it simple \& log: debug # filtered by dispatchers .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" 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. .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... its just a better name than 'debug'. .PP 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 log level to \f(CW\*(C`debug\*(C'\fR, because level filtering is controlled per dispatcher (as well) .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