package logs
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=b75fb28e83f33461b06b5c9b60972c4a9a9a1599d637b4a0c7b1e86a87f34fe5361e817cb31f42ad7e7cbb822473b28fab9f58a02870eb189ebe88dae8e045ff
doc/logs/Logs/Tag/index.html
Module Logs.Tag
Source
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
.
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"
).
printer d
is d
's type pretty-printer.
pp_def ppf d
prints an unspecified representation of d
on ppf
.
Tags
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.
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.
find d s
is the tag value with definition d
in s
(if any).
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
.