Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] syslog interface?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Basile Starynkevitch <basile.starynkevitch@i...>
Subject: Re: [Caml-list] syslog interface?
On Wed, Oct 08, 2003 at 04:09:45AM +0100, Benjamin Geer wrote:

> 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&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