package bos

  1. Overview
  2. Docs
include module type of struct include Logs end
type level = Logs.level =
  1. | App
  2. | Error
  3. | Warning
  4. | Info
  5. | Debug
val level : unit -> level option
val set_level : ?all:bool -> level option -> unit
val pp_level : Stdlib.Format.formatter -> level -> unit
val level_to_string : level option -> string
val level_of_string : string -> (level option, [ `Msg of string ]) Stdlib.result
type src = Logs.src
val default : src
module Src = Logs.Src
module Tag = Logs.Tag
type (!'a, !'b) msgf = (?header:string -> ?tags:Tag.set -> ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a) -> 'b
type !'a log = ('a, unit) msgf -> unit
val msg : ?src:src -> level -> 'a log
val app : ?src:src -> 'a log
val err : ?src:src -> 'a log
val warn : ?src:src -> 'a log
val info : ?src:src -> 'a log
val debug : ?src:src -> 'a log
val kmsg : (unit -> 'b) -> ?src:src -> level -> ('a, 'b) msgf -> 'b
val on_error : ?src:src -> ?level:level -> ?header:string -> ?tags:Tag.set -> pp:(Stdlib.Format.formatter -> 'b -> unit) -> use:('b -> 'a) -> ('a, 'b) Stdlib.result -> 'a
val on_error_msg : ?src:src -> ?level:level -> ?header:string -> ?tags:Tag.set -> use:(unit -> 'a) -> ('a, [ `Msg of string ]) Stdlib.result -> 'a
module type LOG = Logs.LOG
val src_log : src -> (module LOG)
type reporter = Logs.reporter = {
  1. report : 'a 'b. src -> level -> over:(unit -> unit) -> (unit -> 'b) -> ('a, 'b) msgf -> 'b;
}
val nop_reporter : reporter
val format_reporter : ?pp_header:(Stdlib.Format.formatter -> (level * string option) -> unit) -> ?app:Stdlib.Format.formatter -> ?dst:Stdlib.Format.formatter -> unit -> reporter
val reporter : unit -> reporter
val set_reporter : reporter -> unit
val set_reporter_mutex : lock:(unit -> unit) -> unlock:(unit -> unit) -> unit
val report : src -> level -> over:(unit -> unit) -> (unit -> 'b) -> ('a, 'b) msgf -> 'b
val incr_err_count : unit -> unit
val incr_warn_count : unit -> unit
val pp_print_text : Stdlib.Format.formatter -> string -> unit
val pp_header : Stdlib.Format.formatter -> (level * string option) -> unit
val err_count : unit -> int
val warn_count : unit -> int
OCaml

Innovation. Community. Security.