package tezt

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

Install

Dune Dependency

Authors

Maintainers

Sources

tezt-4.2.0.tar.bz2
md5=7878acd788ae59f1a07d0392644f0fff
sha512=b9e8ce2576b0bc65870409380edf17b88656a985ceb9a438a84f479b51d6b30740acf7b035eccf7d122bf5227611bf15e888e607dcdbb1576b4383f12314dd49

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.