module Log:sig
..end
Although this module is fully async-safe it exposes almost no Deferreds. This is partially a design choice to minimize the impact of logging in code, and partially the result of organic design (i.e. older versions of this interface did the same thing).
A (limited) Blocking module is supplied in Global to accomodate the portion of a program
that runs outside of Async.
module Level:sig
..end
module Message:sig
..end
module Rotation:sig
..end
module Output:sig
..end
module Blocking:sig
..end
type
t
module type Global_intf =sig
..end
module Make_global:
module Global:Global_intf
val set_level : t -> Level.t -> unit
set_level
sets the level of the given log. Messages sent at a level less than the
current level will not be output.val set_output : t -> Output.t list -> unit
set_output
changes the output type of the log, which can be useful when daemonizing.
The new output type will be applied to all subsequent messages.val close : t -> unit
close
closes a log so that further write attempts will raise an error.val flushed : t -> unit Import.Deferred.t
flushed
returns a Deferred.t that is fulfilled when the last message delivered to t
before the call to flushed is out the door.val create : level:Level.t -> output:Output.t list -> t
create
create a new logval raw : ?tags:(string * string) list ->
t -> ('a, unit, string, unit) Pervasives.format4 -> 'a
raw
printf like logging for raw (no level) messages. Raw messages are still
output with a timestamp.val debug : ?tags:(string * string) list ->
t -> ('a, unit, string, unit) Pervasives.format4 -> 'a
debug
printf like logging at the `Debug log levelval info : ?tags:(string * string) list ->
t -> ('a, unit, string, unit) Pervasives.format4 -> 'a
info
printf like logging at the `Info log levelval error : ?tags:(string * string) list ->
t -> ('a, unit, string, unit) Pervasives.format4 -> 'a
error
printf like logging at the `Error log levelval printf : ?tags:(string * string) list ->
?level:Level.t ->
t -> ('a, unit, string, unit) Pervasives.format4 -> 'a
printf
generalized printf style loggingval sexp : ?tags:(string * string) list ->
?level:Level.t -> t -> 'a -> ('a -> Core.Std.Sexp.t) -> unit
sexp
logging of values without first converting them to a string. In the case
where the log level would discard this message no conversion will ever be done.val of_lazy : ?tags:(string * string) list ->
?level:Level.t -> t -> string Core.Std.Lazy.t -> unit
of_lazy
logging of lazy values. In the case where the log level would discard this
message no evaluation will ever be forced.val message : t -> Message.t -> unit
module Reader:sig
..end