package tezos-stdlib

  1. Overview
  2. Docs

DSL for logging messages. Opening this locally makes it easy to supply a number of semantic tags for a log event while using their values in the human-readable text. For example:

lwt_log_info Tag.DSL.(fun f ->
    f "request for operations %a:%d from peer %a timed out."
    -% t event "request_operations_timeout"
    -% a Block_hash.Logging.tag bh
    -% s operations_index_tag n
    -% a P2p_peer.Id.Logging.tag pipeline.peer_id)
type (_, _, _, _) arg
val a : 'v def -> 'v -> (('b -> 'v -> 'c) -> 'v -> 'd, 'b, 'c, 'd) arg

Use a semantic tag with a `%a` format, supplying the pretty printer from the tag.

val s : 'v def -> 'v -> ('v -> 'd, 'b, 'c, 'd) arg

Use a semantic tag with ordinary formats such as `%s`, `%d`, and `%f`.

val t : 'v def -> 'v -> ('d, 'b, 'c, 'd) arg

Supply a semantic tag without formatting it.

val (-%) : (?tags:set -> 'a) -> ('a, Stdlib.Format.formatter, unit, 'd) arg -> ?tags:set -> 'd

Perform the actual application of a tag to a format.

OCaml

Innovation. Community. Security.