Config:...gurator(3)
π¦ Config:...gurator(3) β the Perl-fam manual page, bestie edition
ok so you found the <italic>User Contributed Perl Documentation</italic> page for Log::Log4perl::Config::PropertyConfigurator and yes the header got truncated to Config:...gurator(3) which is honestly giving "my name is cut off in the group chat" energy π but we move. This one is lowkey a backstage-pass class, so let's get into it.
β¨ NAME β¨
Log::Log4perl::Config::PropertyConfigurator β it reads properties files. that's it, that's the whole job, and it does it beautifully π
π SYNOPSIS π
heads up: this class is used internally by Log::Log4perl. you're peeking behind the curtain, iykyk.
# This class is used internally by Log::Log4perl
use Log::Log4perl::Config::PropertyConfigurator;
my $conf = Log::Log4perl::Config::PropertyConfigurator->new();
$conf->file("l4p.conf");
$conf->parse(); # will die() on error
my $value = $conf->value("log4perl.appender.LOGFILE.filename");
if(defined $value) {
printf("The appender's file name is $value\n");
} else {
printf("The appender's file name is not defined.\n");
}
ok a few things, bestie:
- you make one with
->new() - you point it at a file with
->file("l4p.conf") - you call
->parse()and it willdie()on error β no cap, that's literally in the comment, so wrap it or don't, your call π«Ά - you grab stuff out with
->value("...")and then you check if it'sdefined, because it might not be, and theelsebranch is literally there to tell you that π
πΈ DESCRIPTION πΈ
it initializes log4perl from a properties file. stuff like this:
log4j.category.a.b.c.d = WARN, A1
log4j.category.a.b = INFO, A1
and here's the iconic part β it also understands variable substitution, so this config right here is equivalent to the one above it (not different, not extra, equivalent β¨):
settings = WARN, A1
log4j.category.a.b.c.d = ${settings}
log4j.category.a.b = INFO, A1
so you set settings = WARN, A1 once and then ${settings} just absorbs it. reusable. efficient. main character config behavior π
β SEE ALSO β
go touch some of these, they're all in the family:
Log::Log4perl::ConfigLog::Log4perl::Config::BaseConfiguratorLog::Log4perl::Config::DOMConfiguratorLog::Log4perl::Config::LDAPConfigurator(tbd!) β yes the original literally says "(tbd!)", we're all waiting together π―οΈ
π LICENSE π
Copyright 2002-2013 by Mike Schilli <m@perlmeister.com> and Kevin Goess <cpan@goess.org>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
(translation: same terms as Perl itself, go be free, just keep the credit π )
π AUTHOR π
Please contribute patches to the project on Github:
http://github.com/mschilli/log4perl
Send bug reports or requests for enhancements to the authors via our
MAILING LIST (questions, bug reports, suggestions/patches): log4perl-devel@lists.sourceforge.net
Authors (please contact them via the list above, not directly): Mike Schilli <m@perlmeister.com>, Kevin Goess <cpan@goess.org>
Contributors (in alphabetical order): Ateeq Altaf, Cory Bennett, Jens Berthold, Jeremy Bopp, Hutton Davidson, Chris R. Donnelly, Matisse Enzer, Hugh Esco, Anthony Foiani, James FitzGibbon, Carl Franks, Dennis Gregorovic, Andy Grundman, Paul Harrington, Alexander Hartmaier David Hull, Robert Jacobson, Jason Kohles, Jeff Macdonald, Markus Peter, Brett Rann, Peter Rabbitson, Erik Selberg, Aaron Straup Cope, Lars Thegler, David Viner, Mac Yang.
reminder from the page itself: contact them via the list above, not directly. respect the queue, bestie π«Ά
and that's the whole page!! no notes, ate and left no crumbs π₯
sign-off time: this little beauty is from perl v5.42.0, dated 2022-10-22, and it lives in the Config:...gurator(3) slot of your man pages. go read Log::Log4perl::Config next, ily, bye ππ·β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Log-Log4perl 1.57-160000.2.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms