Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  POE::COMPONENT::IRC::PLUGIN::LOGGER (3)

.ds Aq ’


POE::Component::IRC::Plugin::Logger - A PoCo-IRC plugin which logs public, private, and DCC chat messages to disk



 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,


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).

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. The default 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.




<B>’Path’B>, the place where you want the logs saved.

<B>’Private’B>, whether or not to log private messages. Defaults to 1.

<B>’Public’B>, whether or not to log public messages. Defaults to 1.

<B>’DCCB>, whether or not to log DCC chats. Defaults to 1.

<B>’Notices’B>, whether or not to log NOTICEs. Defaults to 0.

<B>’Sort_by_date’B>, whether or not to split log files by date, i.e. #channel/YYYY-MM-DD.log instead of #channel.log. If enabled, the date will be omitted from the timestamp. Defaults to 0.

<B>’Strip_color’B>, whether or not to strip all color codes from messages. Defaults to 0.

<B>’Strip_formatting’B>, whether or not to strip all formatting codes from messages. Defaults to 0.

<B>’Restricted’B>, set this to 1 if you want all directories/files to be created without read permissions for other users (i.e. 700 for dirs and 600 for files). Defaults to 1.

<B>’Format’B>, a hash reference representing the log format, if you want to define your own. See the source for details.

<B>’Log_sub’B>, 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. <B>Note:B> You must take care of handling date/time and stripping colors/formatting codes yourself.

Returns a plugin object suitable for feeding to POE::Component::IRC’s plugin_add method.


Returns a hash reference of type/subroutine pairs, for formatting logs according to the default log format.


Hinrik Oern Sigurd`sson,
Search for    or go to Top of page |  Section 3 |  Main Index

perl v5.20.3 POE::COMPONENT::IRC::PLUGIN::LOGGER (3) 2014-06-28

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.