AslAllow an application to log via the Apple System Log
The Apple System Log is intended to be a replacement for syslog on OSX systems.
Example:
let client = Asl.Client.create ~ident:"example" ~facility:"Daemon" ~opts:[ `Stderr ] () in
let message = Asl.Message.create ~sender:"example" () in
Asl.log ~client message `Notice "hello, world!"For context, please read the following documents:
type level = [ | `Emergmost severe, highest level
*)| `Alert| `Crit| `Err| `Warning| `Notice| `Info| `Debugleast severe, lowest level
*) ]Every message has an associated level, which is usually used for filtering.
module Client : sig ... endmodule Message : sig ... endSend a string to the logger with the given message context and level.
Creating a client is optional. If none is provided then a default thread-safe client is used. Note the internal locks can cause extra contention between threads. Note also the only way to have logs printed to stderr is to construct and use a Client.t.