sig
module Level :
sig
type t = [ `Debug | `Error | `Info ]
val of_string : string -> t
val to_string : t -> string
val t_of_sexp : Sexplib.Sexp.t -> Log.Level.t
val __t_of_sexp__ : Sexplib.Sexp.t -> Log.Level.t
val sexp_of_t : Log.Level.t -> Sexplib.Sexp.t
end
module Message :
sig
type t
val time : Log.Message.t -> Core.Std.Time.t
val message : Log.Message.t -> string
val level : Log.Message.t -> Log.Level.t option
val tags : Log.Message.t -> (string * string) list
val bin_t : Log.Message.t Core.Std.Bin_prot.Type_class.t
val bin_read_t : Log.Message.t Core.Std.Bin_prot.Read_ml.reader
val bin_read_t_ : Log.Message.t Core.Std.Bin_prot.Unsafe_read_c.reader
val bin_read_t__ :
(int -> Log.Message.t) Core.Std.Bin_prot.Unsafe_read_c.reader
val bin_reader_t : Log.Message.t Core.Std.Bin_prot.Type_class.reader
val bin_size_t : Log.Message.t Core.Std.Bin_prot.Size.sizer
val bin_write_t : Log.Message.t Core.Std.Bin_prot.Write_ml.writer
val bin_write_t_ :
Log.Message.t Core.Std.Bin_prot.Unsafe_write_c.writer
val bin_writer_t : Log.Message.t Core.Std.Bin_prot.Type_class.writer
val t_of_sexp : Sexplib.Sexp.t -> Log.Message.t
val sexp_of_t : Log.Message.t -> Sexplib.Sexp.t
end
module Rotation :
sig
type t = {
messages : int option;
size : Core.Std.Byte_units.t option;
time : (Core.Std.Time.Ofday.t * Core.Std.Zone.t) option;
keep :
[ `All | `At_least of int | `Newer_than of Core.Std.Time.Span.t ];
naming_scheme : [ `Numbered | `Timestamped ];
}
val t_of_sexp : Sexplib.Sexp.t -> Log.Rotation.t
val sexp_of_t : Log.Rotation.t -> Sexplib.Sexp.t
end
module Output :
sig
type machine_readable_format = [ `Bin_prot | `Sexp ]
type format = [ `Bin_prot | `Sexp | `Text ]
type t
val create :
(Log.Message.t Core.Std.Queue.t -> unit Import.Deferred.t) ->
Log.Output.t
val screen : Log.Output.t
val writer : Log.Output.format -> Import.Writer.t -> Log.Output.t
val file : Log.Output.format -> filename:string -> Log.Output.t
val rotating_file :
Log.Output.format ->
basename:string -> Log.Rotation.t -> Log.Output.t
end
module Blocking :
sig
module Output :
sig
type t
val screen : Log.Blocking.Output.t
val create : (Log.Message.t -> unit) -> Log.Blocking.Output.t
end
val set_level : Log.Level.t -> unit
val set_output : Log.Blocking.Output.t -> unit
val raw :
?tags:(string * string) list ->
('a, unit, string, unit) Pervasives.format4 -> 'a
val info :
?tags:(string * string) list ->
('a, unit, string, unit) Pervasives.format4 -> 'a
val error :
?tags:(string * string) list ->
('a, unit, string, unit) Pervasives.format4 -> 'a
val debug :
?tags:(string * string) list ->
('a, unit, string, unit) Pervasives.format4 -> 'a
end
type t
module type Global_intf =
sig
val log : Log.t Core.Std.Lazy.t
val set_level : Log.Level.t -> unit
val set_output : Log.Output.t list -> unit
val raw :
?tags:(string * string) list ->
('a, unit, string, unit) Pervasives.format4 -> 'a
val info :
?tags:(string * string) list ->
('a, unit, string, unit) Pervasives.format4 -> 'a
val error :
?tags:(string * string) list ->
('a, unit, string, unit) Pervasives.format4 -> 'a
val debug :
?tags:(string * string) list ->
('a, unit, string, unit) Pervasives.format4 -> 'a
val flushed : unit -> unit Import.Deferred.t
val printf :
?tags:(string * string) list ->
?level:Log.Level.t ->
('a, unit, string, unit) Pervasives.format4 -> 'a
val sexp :
?tags:(string * string) list ->
?level:Log.Level.t -> 'a -> ('a -> Core.Std.Sexp.t) -> unit
val of_lazy :
?tags:(string * string) list ->
?level:Log.Level.t -> string Core.Std.Lazy.t -> unit
val message : Log.Message.t -> unit
end
module Make_global : functor (Empty : sig end) -> Global_intf
module Global : Global_intf
val set_level : Log.t -> Log.Level.t -> unit
val set_output : Log.t -> Log.Output.t list -> unit
val close : Log.t -> unit
val flushed : Log.t -> unit Import.Deferred.t
val create : level:Log.Level.t -> output:Log.Output.t list -> Log.t
val raw :
?tags:(string * string) list ->
Log.t -> ('a, unit, string, unit) Pervasives.format4 -> 'a
val debug :
?tags:(string * string) list ->
Log.t -> ('a, unit, string, unit) Pervasives.format4 -> 'a
val info :
?tags:(string * string) list ->
Log.t -> ('a, unit, string, unit) Pervasives.format4 -> 'a
val error :
?tags:(string * string) list ->
Log.t -> ('a, unit, string, unit) Pervasives.format4 -> 'a
val printf :
?tags:(string * string) list ->
?level:Log.Level.t ->
Log.t -> ('a, unit, string, unit) Pervasives.format4 -> 'a
val sexp :
?tags:(string * string) list ->
?level:Log.Level.t -> Log.t -> 'a -> ('a -> Core.Std.Sexp.t) -> unit
val of_lazy :
?tags:(string * string) list ->
?level:Log.Level.t -> Log.t -> string Core.Std.Lazy.t -> unit
val message : Log.t -> Log.Message.t -> unit
module Reader :
sig
val pipe :
[< Log.Output.machine_readable_format ] ->
string -> Log.Message.t Import.Pipe.Reader.t
end
end