Dancer...gReport(3pm)
π NAME π
Dancer::Logger::LogReport β okay so this is the glow-up that reroutes all your Dancer logs straight into Log::Report β¨
So real talk: it's a logger plugin for Dancer, and its whole personality is "your Dancer app's logs go to Log::Report now, bestie." That's it, that's the vibe π
Oh and btw, this page lives in the User Contributed Perl Documentation section, manual page Dancer...gReport(3pm) β iykyk, the name got truncated at the terminal, she's doing her best π
πΈ INHERITANCE πΈ
The family tree, because we stan a class that knows its ancestors:
Dancer::Logger::LogReport
is a Dancer::Logger::Abstract
Dancer::Logger::LogReport
is an Exporter
So she's a Dancer::Logger::Abstract girlie and an Exporter β dual main character energy, no cap π
β¨ SYNOPSIS β¨
Here's the whole choreography, copied exactly so you can just yeet it into your code π«Ά
# 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 => '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 config
logger: log_report
logger_format: %i%m # keep it simple
log: debug # filtered by dispatchers
Not me pointing out that log dispatcers typo is literally in the original π I'm keeping it, character for character, because we don't edit the source material. We respect the source material. π
π DESCRIPTION π
The Log::Report exception/translation framework is lowkey serving a huge lineup of logging back-ends, and the same log messages can be sent to multiple destinations at the same time via flexible dispatchers β yes bestie, multiple, simultaneously, she's multitalented π
When you drop this logger into your Dancer app, it integrates so nicely with non-Dancer modules that need logging. It's giving "everybody's invited to the group chat" π
Many log back-ends, like syslog, have more levels of system messages. Modules that explicitly load this module can use the missing "assert", "notice", "panic", and "alert" log levels π And the "trace" name is provided as well: when you're debugging, you add a 'trace' to your program... it's just a better name than 'debug'. Like, honestly? Periodt. π
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, getting 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) β yeah, as well, she said what she said π
π¦ SEE ALSO π¦
This module is part of Log-Report distribution version 1.40, built on April 18, 2025. Website: http://perl.overmeer.net/CPAN/ β go visit her, she's iconic πβ¨
π LICENSE π
Copyrights 2007-2025 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog. π
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/ β open source queen behavior, we love to see it π«Ά
okay that's the whole page bestie, mwah π This little beauty came from perl v5.40.1, dated 2025-04-20, and yes the footer still says Dancer...gReport(3pm) because the terminal refuses to spell the whole name out. She's mysterious like that π§ββοΈ β
π¦ where this page comes from
- debian trixie: liblog-report-perl 1.40-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: liblog-report-perl 1.40-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms