module Logger: sig .. end
Another logging library.
type message = [ `Debug | `Error | `Fatal | `Info | `Warn ] * string
Another logging library.
type size = [ `Kb of int64 | `Mb of int64 | `Unlimited ]
Another logging library.
type 'a t
type default_t = message t
Another logging library.
val create : ?max_size:size ->
?mode:Core.Std.Unix.file_perm ->
?max_archives:[ `Max of int | `Unlimited ] ->
?full_callback:(string Core.Std.Squeue.t -> unit) ->
?filter:('a -> bool) ->
message_to_string:('a -> string) -> string -> 'a t
val create_default : ?max_size:size ->
?mode:Core.Std.Unix.file_perm ->
?max_archives:[ `Max of int | `Unlimited ] ->
?full_callback:(string Core.Std.Squeue.t -> unit) ->
string -> message t
creates a log using the default message type and a filter that drops
`Debug messages
val log : 'a t -> 'a -> unit
logs a message to log
val filter : 'a t -> ('a -> bool) -> unit
Sets the filter for a log
val clear_filter : 'a t -> unit
removes the filter from a log
misc helper functions
val maybe_log : 'a t option -> 'a -> unit
logs a message to Some log, returns silently if log is None
val timestamp : unit -> string
Returns a timestamp as a string suitable for log files