NAME
POE::Component::IRC::Plugin::Logger - A PoCo-IRC plugin which logs public and private messages to disk.
SYNOPSIS
use POE::Component::IRC::Plugin::Logger;
$irc->plugin_add('Logger', POE::Component::IRC::Plugin::Logger->new(
Path => '/home/me/irclogs',
Private => 0,
Public => 1,
));
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. It tries to detect UTF-8 encoding of every message or else falls back to CP1252 (like irssi does by default). The log format is similar to xchat's, except that it's sane and parsable.
This plugin requires the IRC component to be POE::Component::IRC::State or a subclass thereof. It also requires a POE::Component::IRC::Plugin::BotTraffic to be in the plugin pipeline. It will be added automatically if it is not present.
METHODS
- new
-
Arguments:
'Path', the place where you want the logs saved. 'Private', whether or not to log private messages. Defaults to 1. 'Public', whether or not to log public messages. Defaults to 1. 'SortByDate, whether or not to split log files by date. I.e. C<$channel/$date.log> instead of C<$channel.log>. Defaults to 0.
Returns a plugin object suitable for feeding to POE::Component::IRC's plugin_add() method.
AUTHOR
Hinrik Örn Sigurðsson, hinrik.sig@gmail.com