package tezos-stdlib

  1. Overview
  2. Docs

Module Tag.DSLSource

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)
Sourcetype (_, _, _, _) arg
Sourceval 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.

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

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

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

Supply a semantic tag without formatting it.

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

Perform the actual application of a tag to a format.

OCaml

Innovation. Community. Security.