We first said that DLF converters are perl objects which implements the Lire::DlfConverter interface. What we did is write a class which implements the said interface. Creating the object from that class is the responsability of the DLF converter registration script. This is simply a snippet of perl code which instantiates your object and registers it with the Lire::PluginManager:
use Lire::PluginManager; use MyConverters::SyslogCommonConverter; Lire::PluginManager->register_plugin( MyConverters::SyslogCommonConverter->new() );
That's all there is to it, really. You put this snippet in a
file named syslog_common_init
in one of
the directories listed in the
plugins_init_path
configuration variable.
Some other notes on this topic:
The file can actually be named anything you
want, the name
just make it clear what is the purpose of the file.
service
_init
The initial value of the
plugins_init_path
contains
the directories
and
sysconfdir
/lire/plugins
.
You can change this list by using the
lire tool.
HOME
/.lire/plugins
Your registration script can create and register more than one object.
You can now generate a www report for log
files in that format using the command
lr_log2report common_syslog < file.log
.