/usr/share/doc/lire/dev-manual/ch02s06.html is in lire-devel-doc 2:2.1.1-2.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Registering Your DLF Converter with the Lire Framework</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Lire Developer's Manual"><link rel="up" href="ch02.html" title="Chapter 2. Writing a New DLF Converter"><link rel="prev" href="ch02s05.html" title="The Meta-Data Methods"><link rel="next" href="ch02s07.html" title="DLF Converter API"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Registering Your DLF Converter with the <span class="application">Lire</span> Framework</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s05.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Writing a New DLF Converter</th><td width="20%" align="right"> <a accesskey="n" href="ch02s07.html">Next</a></td></tr></table><hr></div><div class="section" title="Registering Your DLF Converter with the Lire Framework"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sect:registering-dlf-converter"></a>Registering Your DLF Converter with the <span class="application">Lire</span> Framework</h2></div></div></div><p>We first said that DLF converters are perl
<span class="emphasis"><em>objects</em></span> which implements the
<span class="interface">Lire::DlfConverter</span> interface. What we
did is write a <span class="emphasis"><em>class</em></span> which implements
the said interface. Creating the object from that class is
the responsability of the <em class="firstterm">DLF converter
registration script</em>. This is simply a snippet of
perl code which instantiates your object and registers it
with the Lire::PluginManager:
</p><pre class="programlisting">
use Lire::PluginManager;
use MyConverters::SyslogCommonConverter;
Lire::PluginManager->register_plugin(
MyConverters::SyslogCommonConverter->new() );
</pre><p>
That's all there is to it, really. You put this snippet in a
file named <code class="filename">syslog_common_init</code> in one of
the directories listed in the
<code class="varname">plugins_init_path</code>
configuration variable.
</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Some other notes on this topic:
</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>The file can actually be named anything you
want, the name
<code class="filename"><em class="replaceable"><code>service</code></em>_init</code>
just make it clear what is the purpose of the file.
</p></li><li class="listitem"><p>The initial value of the
<code class="varname">plugins_init_path</code> contains
the directories
<code class="filename"><em class="replaceable"><code>sysconfdir</code></em>/lire/plugins</code>
and
<code class="filename"><em class="replaceable"><code>HOME</code></em>/.lire/plugins</code>.
You can change this list by using the
<span class="command"><strong>lire</strong></span> tool.
</p></li><li class="listitem"><p>Your registration script can create and register
more than one object.
</p></li></ol></div><p>
</p></div><p>You can now generate a <span class="type">www</span> report for log
files in that format using the command
<strong class="userinput"><code>lr_log2report common_syslog < file.log</code></strong>.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s05.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The Meta-Data Methods </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> DLF Converter API</td></tr></table></div></body></html>
|