<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/10/9e8f8460e573b77fae81812635df296f"
  from="Basile Starynkevitch &lt;basile.starynkevitch@i...&gt;"
  author="Basile Starynkevitch"
  date="2003-10-08T07:58:27"
  subject="Re: [Caml-list] syslog interface?"
  prev="2003/10/0167512f27a04c9b42f95bcec5cb10da"
  next="2003/10/ac24472a1cecb98a5072dfa9c11183a1"
  prev-in-thread="2003/10/0167512f27a04c9b42f95bcec5cb10da"
  prev-thread="2003/10/83df1b66b7480a3738d4bd32ee128373"
  next-thread="2003/10/ac24472a1cecb98a5072dfa9c11183a1"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] syslog interface?">
<msg 
  url="2003/10/69748afdbc12ebb69a81aa48769c3aab"
  from="Benjamin Geer &lt;ben@s...&gt;"
  author="Benjamin Geer"
  date="2003-10-08T03:09:50"
  subject="[Caml-list] syslog interface?">
<msg 
  url="2003/10/0167512f27a04c9b42f95bcec5cb10da"
  from="Shawn Wagner &lt;shawnw@s...&gt;"
  author="Shawn Wagner"
  date="2003-10-08T03:20:54"
  subject="Re: [Caml-list] syslog interface?">
</msg>
<msg 
  url="2003/10/9e8f8460e573b77fae81812635df296f"
  from="Basile Starynkevitch &lt;basile.starynkevitch@i...&gt;"
  author="Basile Starynkevitch"
  date="2003-10-08T07:58:27"
  subject="Re: [Caml-list] syslog interface?">
</msg>
</msg>
</thread>

<contents>
On Wed, Oct 08, 2003 at 04:09:45AM +0100, Benjamin Geer wrote:

&gt; Does anyone know of an ocaml interface to the Unix syslog daemon ?


In my previous job, I coded such an interface. It is in the POESIA monitor
(Poesia is a content filter - see www.poesia-filter.org for details, and its
monitor is coded in Ocaml) which is opensource, under GPL license.


The relevant files are util.ml, util.mli, util_ml.c available under
http://cvs.sourceforge.net/viewcvs.py/poesia/PoesiaSoft/PoesiaMonIcap/ (to
compile the whole util.ml file, you also need the pa_trace.ml camlp4
preprocessor; but if you look for syslog only, you can copy&amp;paste the
relevant functions and use util_ml.c).

The code was coded for ocaml 3.06; in practical terms, you'll better write
ignore (esyslogprintf ...). Using the format4 type of ocaml 3.06 for kprintf
would make it easier in ocaml 3.07. However the code does compile and run
correctly under 3.07

Regards

-- 
Basile STARYNKEVITCH -- basile dot starynkevitch at inria dot fr
Project cristal.inria.fr - phone +33 1 3963 5197 - mobile 6 8501 2359
http://cristal.inria.fr/~starynke --- all opinions are only mine 

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

