Module Logs.Src

module Src: sig .. end

Sources.


Sources

type t = Logs.src 

The type for log sources.

val create : ?doc:string -> string -> Logs.src

create ?doc name is a new log source. name is the name of the source; it doesn't need to be unique but it is good practice to prefix the name with the name of your package or library (e.g. "mypkg.network"). doc is a documentation string describing the source, defaults to "undocumented". The initial reporting level of the source is defined by Logs.level.

val name : Logs.src -> string

name is src's name.

val doc : Logs.src -> string

doc src is src's documentation string.

val level : Logs.src -> Logs.level option

level src is the report level of src (if any).

val set_level : Logs.src -> Logs.level option -> unit

set_level src l sets the report level of src to l. Only applications should use this function directly, see usage conventions.

val equal : Logs.src -> Logs.src -> bool

equal src src' is true iff src and src' are the same source.

val compare : Logs.src -> Logs.src -> int

compare src src' is a total order on sources.

val pp : Stdlib.Format.formatter -> Logs.src -> unit

pp ppf src prints an unspecified representation of src on ppf.

val list : unit -> Logs.src list

list () is the current exisiting source list.