package logs
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=86f4a02807eb1a297aae44977d9f61e419c31458a5d7b23c6f55575e8e69d5ca
md5=2bf021ca13331775e33cf34ab60246f7
doc/logs/Logs/Tag/index.html
Module Logs.Tag
Message tags.
Message tags are arbitrary named and typed values that can be associated to log messages. See an example.
Tag definitions
The type for tag definitions. The type 'a is the type of the tag. The definition specifies a name for the tag, a pretty-printer for the type of the tag and a documentation string. See def.
val def : ?doc:string -> string -> (Format.formatter -> 'a -> unit) -> 'a defdef ~doc name pp is a tag definition. name is the name of the tag, it doesn't need to be unique. pp is a printer for the type of the tag. doc is a documentation string describing the tag (defaults to "undocumented").
val name : 'a def -> stringname d is d's name.
val doc : 'a def -> stringdoc d is d's documentation string.
val printer : 'a def -> Format.formatter -> 'a -> unitprinter d is d's type pretty-printer.
val pp_def : Format.formatter -> 'a def -> unitpp_def ppf d prints an unspecified representation of d on ppf.
val list : unit -> def_e listtag_list () is the list of currently existing tag definitions.
Tags
val pp : Format.formatter -> t -> unitpp ppf t prints an unspecified representation of t on ppf.
Tag sets
val empty : setempty is the empty set.
val is_empty : set -> boolis_empty s is true iff s is empty.
add d v s is s with the tag (V (d, v)) added. If there was a tag with definition d in s it is replaced.
fold f s acc is the result of folding f over the tags of s starting with acc.
val pp_set : Format.formatter -> set -> unitpp_set ppf s prints an unspecified representation of s on ppf.