POE::C...:Logger(3pm)
π POE::Component::IRC::Plugin::Logger π
okay bestie, gather round, because this is the manual page for POE::Component::IRC::Plugin::Logger, straight out of the User Contributed Perl Documentation (yeah, that's the POE::C...:Logger(3pm) you saw in the header β it's just the long name getting squished π
).
β¨ NAME β¨
POE::Component::IRC::Plugin::Logger β a PoCo-IRC plugin which logs public, private, and DCC chat messages to disk. like, it's a lil scribe for your IRC life, no cap ππ
πΈ SYNOPSIS πΈ
use POE::Component::IRC::Plugin::Logger;
$irc->plugin_add('Logger', POE::Component::IRC::Plugin::Logger->new(
Path => '/home/me/irclogs',
DCC => 0,
Private => 0,
Public => 1,
));
there it is. drop it in, hand it a Path, and it starts writing everything down like the world's most dedicated group-chat historian π«Ά
π¦ DESCRIPTION π¦
POE::Component::IRC::Plugin::Logger is a POE::Component::IRC plugin. It logs messages and CTCP ACTIONs to either #some_channel.log or some_nickname.log in the supplied path. In the case of DCC chats, a = is prepended to the nickname (like in irssi). iconic behaviour honestly β¨
the plugin tries to detect UTF-8 encoding of every message or else falls back to CP1252, like irssi (and, supposedly, mIRC) does by default. Resulting log files will be UTF-8 encoded. and the default log format is similar to xchat's, except that it's sane and parsable π (yes bestie, that is a read)
β οΈ heads up: This plugin requires the IRC component to bePOE::Component::IRC::Stateor a subclass thereof. It also requires aPOE::Component::IRC::Plugin::BotTrafficto be in the plugin pipeline. It will be added automatically if it is not present. so like, don't stress, it handles that part for you π«Ά
π METHODS π
π new
Arguments, bestie, one at a time:
'Path'β the place where you want the logs saved. π'Private'β whether or not to log private messages. Defaults to1.'Public'β whether or not to log public messages. Defaults to1.'DCC'β whether or not to log DCC chats. Defaults to1.'Notices'β whether or not to log NOTICEs. Defaults to0.'Sort_by_date'β whether or not to split log files by date, i.e.#channel/YYYY-MM-DD.loginstead of#channel.log. If enabled, the date will be omitted from the timestamp. Defaults to0.'Strip_color'β whether or not to strip all color codes from messages. Defaults to0.'Strip_formatting'β whether or not to strip all formatting codes from messages. Defaults to0.'Restricted'β set this to1if you want all directories/files to be created without read permissions for other users (i.e.700for dirs and600for files). Defaults to1. π'Format'β a hash reference representing the log format, if you want to define your own. See the source for details.'Log_sub'β a subroutine reference which can be used to override the file logging. Use this if you want to store logs in a database instead, for example. It will be called with 3 arguments: the context (a channel name or nickname), a type (e.g.'privmsg'or'+b', and any arguments to that type. You can make use "default_format" to create logs that match the default log format.
π note: You must take care of handling date/time and stripping colors/formatting codes yourself. no shortcuts bestie, that part is on you π
Returns a plugin object suitable for feeding to POE::Component::IRC's plugin_add method. feed the plugin, slay the logs π₯
β default_format
Returns a hash reference of type/subroutine pairs, for formatting logs according to the default log format. it's giving "here's the blueprint, go off" π
π AUTHOR π
Hinrik Γrn SigurΓ°sson, hinrik.sig@gmail.com π
and that's the whole page babes π β shipped with perl v5.40.1, dated 2025-08-21, and you read it all the way through?? main character energy fr fr πβ¨π
π¦ where this page comes from
- ubuntu resolute: libpoe-component-irc-perl 6.95+dfsg-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpoe-component-irc-perl 6.95+dfsg-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