sig
type kind = Result | Feedback | Debug | Warning | Error | Failure
type source = { src_file : string; src_line : int; }
type event = {
evt_kind : Log.kind;
evt_plugin : string;
evt_source : Log.source option;
evt_message : string;
}
type 'a pretty_printer =
?current:bool ->
?source:Log.source ->
?emitwith:(Log.event -> unit) ->
?echo:bool ->
?once:bool ->
?append:(Format.formatter -> unit) ->
('a, Format.formatter, unit) Pervasives.format -> 'a
type ('a, 'b) pretty_aborter =
?current:bool ->
?source:Log.source ->
?echo:bool ->
?append:(Format.formatter -> unit) ->
('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'a
exception AbortError of string
exception AbortFatal of string
exception FeatureRequest of string * string
val protect : exn -> string
module type Messages =
sig
val verbose_atleast : int -> bool
val debug_atleast : int -> bool
val result : ?level:int -> 'a Log.pretty_printer
val feedback : ?level:int -> 'a Log.pretty_printer
val debug : ?level:int -> 'a Log.pretty_printer
val warning : 'a Log.pretty_printer
val error : 'a Log.pretty_printer
val abort : ('a, 'b) Log.pretty_aborter
val failure : 'a Log.pretty_printer
val fatal : ('a, 'b) Log.pretty_aborter
val verify : bool -> ('a, bool) Log.pretty_aborter
val not_yet_implemented :
('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'a
val deprecated : string -> now:string -> ('a -> 'b) -> 'a -> 'b
val with_result : (Log.event -> 'a) -> ('b, 'a) Log.pretty_aborter
val with_warning : (Log.event -> 'a) -> ('b, 'a) Log.pretty_aborter
val with_error : (Log.event -> 'a) -> ('b, 'a) Log.pretty_aborter
val with_failure : (Log.event -> 'a) -> ('b, 'a) Log.pretty_aborter
val log :
?kind:Log.kind -> ?verbose:int -> ?debug:int -> 'a Log.pretty_printer
val with_log :
(Log.event -> 'a) -> ?kind:Log.kind -> ('b, 'a) Log.pretty_aborter
val register : Log.kind -> (Log.event -> unit) -> unit
val register_tag_handlers :
(string -> string) * (string -> string) -> unit
end
module Register :
functor
(P : sig
val channel : string
val label : string
val verbose_atleast : int -> bool
val debug_atleast : int -> bool
end) ->
Messages
val set_echo : ?plugin:string -> ?kind:Log.kind list -> bool -> unit
val add_listener :
?plugin:string -> ?kind:Log.kind list -> (Log.event -> unit) -> unit
val echo : Log.event -> unit
val notify : Log.event -> unit
type channel
val new_channel : string -> Log.channel
type prefix = Label of string | Prefix of string | Indent of int
val log_channel :
Log.channel ->
?kind:Log.kind -> ?prefix:Log.prefix -> 'a Log.pretty_printer
val with_log_channel :
Log.channel ->
(Log.event -> 'a) ->
?kind:Log.kind -> ?prefix:Log.prefix -> ('b, 'a) Log.pretty_aborter
val kernel_channel_name : string
val kernel_label_name : string
val set_current_source : (unit -> Log.source) -> unit
val null : Format.formatter
val nullprintf : ('a, Format.formatter, unit) Pervasives.format -> 'a
val with_null :
(unit -> 'a) -> ('b, Format.formatter, unit, 'a) Pervasives.format4 -> 'b
val set_output : (string -> int -> int -> unit) -> (unit -> unit) -> unit
val print_on_output : ('a, Format.formatter, unit) Pervasives.format -> 'a
val print_delayed : ('a, Format.formatter, unit) Pervasives.format -> 'a
end