Cataly...ispatch(3pm)

πŸ“¦
version 0.121 Β· 2 versions
  • 0.121 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.121 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Okay bestie, gather round, because Catalyst::Plugin::Log::Dispatch is literally the plugin that lets your Catalyst app log stuff through Log::Dispatch. That's it, that's the vibe. It's a Perl module page (section 3pm, if you're keeping score ✨) and it's giving "your app talks, the logger listens." πŸŽ€


✨ VERSION ✨

This doc is describing Catalyst::Plugin::Log::Dispatch version 2.15. No cap. 🫢


🌸 SYNOPSIS 🌸

First things first, you gotta pull the plugin into your app:

package MyApp;

use Catalyst qw/Log::Dispatch/;

Then you can set up your config right in the source code, like:

MyApp->config->{ Log::Dispatch } = [
    {
     class     => 'File',
     name      => 'file',
     min_level => 'debug',
     filename  => MyApp->path_to('debug.log'),
     format    => '[%p] %m %n',
    }];

Orrr you can do it in myapp.yml, if YAML is more your era:

Log::Dispatch:
 - class: File
   name: file
   min_level: debug
   filename: __path_to(debug.log)__
   mode: append
   format: '[%p] %m %n'
🚨 Important bestie alert: if you're using Catalyst::Plugin::ConfigLoader, you have to load this module after Catalyst::Plugin::ConfigLoader. Order matters, periodt. The way that sequencing just is the whole thing. πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

Catalyst::Plugin::Log::Dispatch is a plugin, and its one job β€” its whole main character arc β€” is to let you use Log::Dispatch from inside Catalyst. Iconic. No notes. 🌈


πŸŽ€ CONFIGURATION πŸŽ€

The config here is the same as the configuration of Log::Dispatch, with two little exceptions β€” it excludes "class" and "format". Those two get their own special treatment, so let's talk about them:

  • class β€” this is the class name pointing at your Log::Dispatch::* object. And here's the cute part: you just specify the name that comes right after "Log::Dispatch::" in the class name. Don't type the whole thing, just the tail end. 🐣
  • format β€” this one works exactly the same as the format option of Log::Dispatch::Config. Same energy, same behavior, zero surprises. πŸ’œ

🧚 DEPENDENCIES 🧚

You're gonna need these in your life:

  • Catalyst
  • Log::Dispatch
  • Log::Dispatch::Config

πŸ‘‘ AUTHOR πŸ‘‘

Shota Takayama <shot[at]bindstorm.jp> β€” the actual legend behind this. Shoutout. πŸ™Œ


Copyright (c) 2006, Shota Takayama "<shot[at]bindstorm.jp>". All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.


And that's the whole page, bestie β€” this doc was generated by perl v5.34.0 on 2022-06-09, and it's the Cataly...ispatch(3pm) page in all its glory. Go forth and log responsibly. πŸ«Άβœ¨πŸ’…

πŸ“¦ where this page comes from