<tt><font size=2>Jakob Schlyter <jakob@kirei.se> wrote on 31/08/2009
09:57:34:<br>
<br>
> > Relativating my own democode, I see the inclusion of a complete
Python<br>
> > interpreter as a potential problem:<br>
> > * as a static library, it makes programs larger<br>
> > * as a dynamic library, it adds a dependency (on python-devel)<br>
> ><br>
> > Another approach, with a similar drop-in-place approach, could
be to<br>
> > use an exec() call to invoke the "logger" utility or
another (shell)<br>
> > script with the same options as used to logger(1),<br>
> <br>
> for each and every log line? that's something I would encourage my
 <br>
> competitors do do.</font></tt>
<br>
<br><tt><font size=2>Agreed.</font></tt>
<br>
<br><tt><font size=2>We have multiple daemon processes all logging to syslog.
 If we want to give users the ability to process log messages, I suggest
that we ensure that all OpenDNSSEC code logs via a thin wrapper around
syslog which calls a user-exit function and, depending on the returned
status, syslog, e.g.</font></tt>
<br>
<br><tt><font size=2>void MsgLog(<arguments>)</font></tt>
<br><tt><font size=2>{</font></tt>
<br><tt><font size=2>   if (UeLog(<arguments>) == 0) {</font></tt>
<br><tt><font size=2>      syslog(<arguments>)</font></tt>
<br><tt><font size=2>   }</font></tt>
<br><tt><font size=2>}</font></tt>
<br>
<br><tt><font size=2>As part of the OpenDNSSEC distribution, we include
a DLL that contains nothing but dummy user-exit functions.  The one
for UeLog would look like:</font></tt>
<br>
<br><tt><font size=2>int UeLog(<arguments>)</font></tt>
<br><tt><font size=2>{</font></tt>
<br><tt><font size=2>   return 0;</font></tt>
<br><tt><font size=2>}</font></tt>
<br>
<br><tt><font size=2>If the user wants to intercept log messages, all they
need to do is to replace this one DLL without touching the rest of the
OpenDNSSEC code.  They can do what they want with each message (such
as starting a Python script or suppressing syslog output), but there is
minimal overhead if they choose not to use the capability.</font></tt>
<br>
<br><tt><font size=2>> <br>
> > Having said that, I'm interested in hearing your thoughts on
the<br>
> > trade-offs.<br>
> <br>
> for version 1, which is our focus currently - I say we do syslog only.</font></tt>
<br>
<br><tt><font size=2>Agreed again.  For version 1, let's do the minimum
required to get it working.</font></tt>
<br>
<br><tt><font size=2>Stephen</font></tt>
<br>