POE::Co...og4perl(3)
π POE::Component::Log4perl π
okay bestie, so this is POE::Component::Log4perl(3) β a User Contributed Perl Documentation page, and honestly? it's giving "logging, but make it POE." πΈ
β¨ NAME β¨
POE::Component::Log4perl β a Perl extension for the POE Environemt
yes, "Environemt." that's the original spelling, and I am not fixing it. character development π
π SYNOPSIS π
use POE::Component::Log4perl;
POE::Component::Log4perl->spawn(
Alias => 'logger',
Category => 'default',
ConfigFile => 'logging.conf',
GetLogfile => \&get_logfile,
);
look at that. four little params and you're logging like a main character. π¦
π DESCRIPTION π
Well, just what everybody needs, another logging module for the POE environment. This one will encapsulate the Log4perl modules to do the logging.
This modules understands the following parameters:
Aliasβ The alias for the sessionCategoryβ The category to use from the configuration fileConfigFileβ The name of the configuration fileGetLogfileβ This points to a function to return the logfile name
okay so a word about the GetLogfile parameter, because it's lowkey the whole personality of this module. In my environment, I use a single centralized configuration file to handle the logging environment. This makes management a bit easier. Log4perl allows this to happen by using a callback to your main routine to retrieve the filename. The GetLogfile allows you to name the function to handle that task. The function name should match the one in the configuration file. If you don't use this ability then you can safely ignore this parameter. fr fr, it's optional, no pressure. π«Ά
β EVENTS β
info
This event will insert an "INFO" line into your logfile.
Example:
$poe_kernel->post('logger' => info => 'my cool message');
warn
This event will insert a "WARN" line into your logfile.
error
This event will insert an "ERROR" line into your logfile.
fatal
This event will insert a "FATAL" line into your logfile.
Example:
$poe_kernel->post('logger' => fatal => 'bad mojo');
$poe_kernel->yield('shutdown');
π "bad mojo" then immediately shutting down. iconic. that's the whole mood.
debug
This event will insert a "DEBUG" line into your logfile.
π₯ SEE ALSO π₯
Log::Log4perlPOE::Component::LoggerPOE::Component::SimpleLogger
the little log4perl family reunion, we love to see it π
π AUTHOR π
Kevin L. Esteb, <kesteb@wsipc.org>
π COPYRIGHT AND LICENSE π
Copyright (C) 2007 by Kevin L. Esteb
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
and that's the whole page bestie, no cap. this one's from perl v5.42.0, dated 2025-07-25, and it's POE::Co...og4perl(3) β the manual page that got its title cut off but never its vibes. go forth and log. β¨πβ¨
π¦ where this page comes from
- fedora 43: perl-POE-Component-Log4perl 0.03-44.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms