package tezt

  1. Overview
  2. Docs

Command-line arguments that control logging.

val color : bool

--color, --no-color

type level =
  1. | Quiet
  2. | Error
  3. | Warn
  4. | Report
  5. | Info
  6. | Debug

Log levels for standard output.

The list below is sorted from the most quiet level to the most verbose level.

  • Absolutely no log has log level Quiet. In other words, setting log level Quiet inhibits all logs.
  • Error logs are about errors which imply that the current test failed. This includes messages given to Test.fail and uncaught exceptions.
  • Warn logs are about errors that do not cause the current test to fail. This includes failure to clean up temporary files, for instance.
  • Report logs are informational messages that report the result of the current test. They tell the user whether the test was successful or not. They may also include information about how to re-run the test.
  • Info logs are informational messages that summarize what the test is doing. They tell the user that a particular milestone was reached. In tests, it is a good idea to log Info messages at significant checkpoints.
  • Debug logs give more details about exactly what is happening. They include external process outputs, exit codes, and signals which are sent.

Additionally, some flags such as --commands and --list cause some information to be printed unconditionally, even with --quiet. Such kind of output is not considered to be log messages.

val level : level

--log-level, --verbose, --quiet, --info

val file : string option

--log-file

val buffer_size : int

--log-buffer-size

val worker_id : bool

--log-worker-id

val commands : bool

--commands

OCaml

Innovation. Community. Security.