Log::D...Config(3pm)
β¨ NAME β¨
Log::Dispatch::Configurator::AppConfig β bestie, it's the configurator implementation that runs on AppConfig π
(also the manual is filed under Log::D...Config(3pm) in the User Contributed Perl Documentation, because apparently we're too iconic for a full name in the header π)
πΈ SYNOPSIS πΈ
okay so here's the whole vibe, copy-paste ready:
use Log::Dispatch::Config;
use Log::Dispatch::Configurator::AppConfig;
my $config = Log::Dispatch::Configurator::AppConfig->new('log.cfg');
Log::Dispatch::Config->configure($config);
# nearby piece of code
my $log = Log::Dispatch::Config->instance;
likeβ¦ you make the config object, you hand it to Log::Dispatch::Config->configure, and then any random nearby piece of code can just grab ->instance. no cap, that's the entire flex π«Ά
π¦ DESCRIPTION π¦
Log::Dispatch::Configurator::AppConfig is an implementation of Log::Dispatch::Configurator that uses the AppConfig format. here's what a sample config file looks like, and yes it's giving organized:
dispatchers = file screen
file.class = Log::Dispatch::File
file.min_level = debug
file.filename = /path/to/log
file.mode = append
file.format = [%d] [%p] %m at %F line %L%n
screen.class = Log::Dispatch::Screen
screen.min_level = info
screen.stderr = 1
screen.format = %m
and guess what β you can also use ini style grouping if that's more your aesthetic:
[file]
class = Log::Dispatch::File
min_level = debug
[screen]
class = Log::Dispatch::Screen
min_level = info
π¨ okay important warning moment: if you use _ (underscore) in a dispatcher name, something very bad may happen. it is safe when you avoid doing so. so likeβ¦ don't. literally just don't. π
π AUTHOR π
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π (slay licensing, honestly)
π SEE ALSO π
Log::Dispatch::ConfigAppConfig
and that's the page, bestie π§ β this one shipped as perl v5.34.0, dated 2022-06-15, filed under Log::D...Config(3pm) in the User Contributed Perl Documentation. go forth and configure your dispatchers, just keep those underscores out of the name β¨π
π¦ where this page comes from
- debian bookworm: liblog-dispatch-config-perl 1.04-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: liblog-dispatch-config-perl 1.04-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: liblog-dispatch-config-perl 1.04-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: liblog-dispatch-config-perl 1.04-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: liblog-dispatch-config-perl 1.04-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms