sig
val output : unit BatIO.output Stdlib.ref
val prefix : string Stdlib.ref
type flag = [ `Custom of unit -> string | `Date | `Filepos | `Time ]
val flags : BatLog.flag list Stdlib.ref
val log : ?fp:string -> string -> unit
val logf : ?fp:string -> ('a, unit BatIO.output, unit) Stdlib.format -> 'a
val fatal : ?fp:string -> string -> 'a
val fatalf :
?fp:string -> ('a, unit BatIO.output, unit) Stdlib.format -> 'a
module type Config =
sig
type t
val out : BatLog.Config.t BatIO.output
val prefix : string
val flags : BatLog.flag list
end
module Make :
functor (S : Config) ->
sig
val log : ?fp:string -> string -> unit
val logf :
?fp:string -> ('a, S.t BatIO.output, unit) Stdlib.format -> 'a
val fatal : ?fp:string -> string -> 'a
val fatalf :
?fp:string -> ('a, S.t BatIO.output, unit) Stdlib.format -> 'a
end
val make_logger :
'a BatIO.output ->
string ->
[< `Custom of unit -> string | `Date | `Filepos | `Time ] list ->
< fatal : ?fp:string -> string -> 'b;
fatalf : ?fp:string ->
('c, 'a BatIO.output, unit, unit, unit, 'd) Stdlib.format6 ->
'c;
log : ?fp:string -> string -> unit;
logf : ?fp:string -> ('e, 'a BatIO.output, unit) Stdlib.format -> 'e >
type easy_lev =
[ `always | `debug | `error | `fatal | `info | `trace | `warn ]
module Easy :
sig
val level : BatLog.easy_lev Stdlib.ref
val output : unit BatIO.output Stdlib.ref
val log : ?fp:string -> BatLog.easy_lev -> string -> unit
val logf :
?fp:string ->
BatLog.easy_lev -> ('a, unit BatIO.output, unit) Stdlib.format -> 'a
end
module type Level_sig =
sig
type t
val to_string : BatLog.Level_sig.t -> string
val default_level : BatLog.Level_sig.t
val compare : BatLog.Level_sig.t -> BatLog.Level_sig.t -> int
end
module Make_lev :
functor (L : Level_sig) (S : Config) ->
sig
val level : L.t Stdlib.ref
val output : S.t BatIO.output Stdlib.ref
val log : ?fp:string -> L.t -> string -> unit
val logf :
?fp:string ->
L.t -> ('a, S.t BatIO.output, unit) Stdlib.format -> 'a
end
end