package tezt

  1. Overview
  2. Docs
Test framework for unit tests, integration tests, and regression tests

Install

Dune Dependency

Authors

Maintainers

Sources

tezt-4.1.0.tar.bz2
md5=88c2d9d3da75ff554599bc34cbf5acbe
sha512=e60294514ecc4a989ce663ebb306e56f654dcfaffb7dbe5e3f05f5a13c9c2ff64dadde4a77b0d9a8567a76a6a7a2b25e0940ccd2a956ffcb85ff9300bfebe3bc

doc/tezt.core/Tezt_core/Log/Style/index.html

Module Log.StyleSource

Modify the style of the log outputs

Sourcetype timestamp =
  1. | Hidden
  2. | Visible of float -> string

Prefix the log message with a timestamp (Visible) or not (Hidden).

The function parameter of Visible receives a UNIX timestamp and shall format it as a string such as "HH:MM:SS.FFF". An example of such function is default_timestamp_format.

Sourcetype prefix =
  1. | Hidden
  2. | Visible of string -> string

Prefix the log message with a prefix (Visible) or not (Hidden).

The function parameter of Visible receives the ~prefix argument of log functions and shall return how to print it, without brackets. Fun.id is typically used but you can also add colors, force character case, shorten prefixes which are too long etc.

Sourceval default_timestamp_format : float -> string

Format the timestamp as HH:MM:SS.FFF.

Sourceval default_timestamp : timestamp

Alias for Visible default_timestamp_format, or Hidden if --no-log-timestamp.

Sourceval default_prefix : prefix

Alias for Visible Fun.id, or Hidden if --no-log-prefix.

Sourceval set_timestamp : timestamp -> unit

set_timestamp timestamp sets the style for the timestamp.

Sourceval set_prefix : prefix -> unit

set_prefix prefix sets the style for the prefix.

Sourceval get_timestamp : unit -> timestamp

get_timestamp gets the style of the timestamp.

Sourceval get_prefix : unit -> prefix

get_prefix gets the style of the prefix.

OCaml

Innovation. Community. Security.