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