Module Kwsyslog

module Kwsyslog: sig .. end

syslog(3) routines for OCaml (Shawn Wagner and Keith Waclena)

Copyright (C) 2002 Shawn Wagner <raevnos@pennmush.org>

Hacked by Keith Waclena <http://www.lib.uchicago.edu/keith/> to remove all dependencies on C; now pure OCaml code

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author(s): Shawn Wagner



Syslog routines

These are based on the unix syslog(3) function and relatives.
type facility = [ `LOG_AUTH
| `LOG_AUTHPRIV
| `LOG_CONSOLE
| `LOG_CRON
| `LOG_DAEMON
| `LOG_FTP
| `LOG_KERN
| `LOG_LOCAL0
| `LOG_LOCAL1
| `LOG_LOCAL2
| `LOG_LOCAL3
| `LOG_LOCAL4
| `LOG_LOCAL5
| `LOG_LOCAL6
| `LOG_LOCAL7
| `LOG_LPR
| `LOG_MAIL
| `LOG_NEWS
| `LOG_NTP
| `LOG_SECURITY
| `LOG_SYSLOG
| `LOG_USER
| `LOG_UUCP ]
The assorted logging facilities. The default is `LOG_USER. You can set a new default with openlog, or give a specific facility per syslog call.
type flag = [ `LOG_CONS | `LOG_NDELAY | `LOG_PERROR | `LOG_PID ] 
Flags to pass to openlog. `LOG_CONS isn't implemented yet.
type level = [ `LOG_ALERT
| `LOG_CRIT
| `LOG_DEBUG
| `LOG_EMERG
| `LOG_ERR
| `LOG_INFO
| `LOG_NOTICE
| `LOG_WARNING ]
The priority of the error.
val set_logpath : string -> unit
If your syslogd unix socket isn't /dev/log, call this before openlog or syslog to change it to the proper file
val set_socktype : Unix.socket_type -> unit
If your syslogd unix socket isn't a datagram one Unix.SOCK_DGRAM), call this with the proper one before openlog or syslog
val openlog : string -> flag list -> facility -> unit
Same as openlog(3)
val syslog : ?fac:facility -> level -> string -> unit
Same as syslog(3), except there's no formats.
val closelog : unit -> unit
Close the log
val log : myself:string ->
?fac:facility -> ?lvl:level -> string -> unit
Convenience function