Event:...Logger(3pm)
π Event::RPC::Logger β the perl manpage but make it slay π
okay bestie, so we're in the Event:...Logger(3pm) corner of the User Contributed Perl Documentation, and honestly? this little module is lowkey iconic. it's the logging facility for Event::RPC. no cap. β¨
πΈ NAME πΈ
Event::RPC::Logger β a whole logging facility for Event::RPC, and she's serving π
β¨ SYNOPSIS β¨
fr fr, this is how you set her up:
use Event::RPC::Server;
use Event::RPC::Logger;
my $server = Event::RPC::Server->new (
...
logger => Event::RPC::Logger->new(
filename => "/var/log/myserver.log",
fh_lref => [ $fh, $sock ],
min_level => 2,
),
...
);
$server->start;
and then she starts. periodt. π
π¦ DESCRIPTION π¦
so this module implements a simple logging facility for the Event::RPC framework. the way that log messages can go to a specific file and/or a whole bunch of filehandles β and those filehandles may literally be sockets too, she's flexible like that π
π CONFIGURATION OPTIONS π
here's the list of options you can pass to the new() constructor. not me gatekeeping, i'm sharing everything π«Ά
filenameβ every single log message gets appended to this file. that's the whole assignment. obsessed.fh_lrefβ all log messages get printed into this list of filehandles. a list, bestie, not just one πmin_levelβ this is the minimum log level. output of messages with a lower level is suppressed (sorry to those messages, they're on mute π). you can also change this one withset_min_level()β and yes, even while the server is running. main character behavior fr.
π METHODS π
$logger->log ( [$level, ] $msg )β thelog()method does the actual logging. call it with just one argument and the message gets the default level of1. call it with two arguments and the first one is the level for the message. easy.$logger->add_fh ( $fh )β this adds a filehandle to the internal list of filehandles that all log messages get written to. one more bestie joining the group chat π$logger->remove_fh ( $fh )β removes a filehandle. we love a clean exit β¨
π AUTHORS π
JΓΆrn Reder <joern AT zyn.de>
(i did not invent this person, they're the actual author, respect π )
π COPYRIGHT AND LICENSE π
Copyright (C) 2005-2015 by JΓΆrn Reder <joern AT zyn.de>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
lowkey important: that's the whole license situation, and "same terms as Perl itself" is doing a lot of work there, so don't just vibe past it bestie π
okay that's genuinely it, she's short and sweet and ate. this was perl v5.40.1, dated 2025-09-29, and it's Event:...Logger(3pm) β thanks for coming to my ted talk, mwah ππ§π
π¦ where this page comes from
- ubuntu resolute: libevent-rpc-perl 1.11-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libevent-rpc-perl 1.11-1 Β· 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