Module Logs.TagSource
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.
The type for existential tag definitions.
def ~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").
name d is d's name.
doc d is d's documentation string.
printer d is d's type pretty-printer.
pp_def ppf d prints an unspecified representation of d on ppf.
tag_list () is the list of currently existing tag definitions.
Tags
The type for tags. Tuples the tag definition and its value.
pp ppf t prints an unspecified representation of t on ppf.
Tag sets
The type for tag sets. A tag set contains at most one tag per tag definition.
empty is the empty set.
is_empty s is true iff s is empty.
mem d s is true iff s has a tag with definition d.
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.
rem d s is s without the tag defined by d (if there was one).
find d s is the tag value with definition d in s (if any).
get d s is like find d s but
fold f s acc is the result of folding f over the tags of s starting with acc.
pp_set ppf s prints an unspecified representation of s on ppf.