Module Pretty

module Pretty: sig .. end
Functions for pretty ascii output (colors, etc.)

By default a set of tags are added to stdout and stderr. To activate them call Format.pp_set_tags fmt true. Colors can be added to another formatter with the function Pretty.add_colors.

Tags must be added to the format string with @{<tag> what you want@}. They can be arbitrarily nested. For instance to print a string in red with part of it bold do

Format.printf "@{<red>I'm red. @{<b> I'm bold red.@}@}"

The font tags available are:

The color (foreground) tags are: And their bright version The background color tags are: And their bright version
Author(s): Alain Mebsout

Pretty colors

val vt_width : int
Width of the virtual terminal (80 if cannot be detected)
val print_line : Format.formatter -> unit -> unit
prints separating line
val print_double_line : Format.formatter -> unit -> unit
prints separating double line
val add_colors : Format.formatter -> unit
add color tags to a formatter

Event tags

val timeout_tag : Format.formatter -> unit
Timeout tag.
val success_tag : Format.formatter -> unit
Success tag.
val failure_tag : Format.formatter -> unit
Failure tag.
val error_tag : Format.formatter -> unit
Error tag.
val warning_tag : Format.formatter -> unit
Warning tag.
val note_tag : Format.formatter -> unit
Note tag.
val interruption_tag : Format.formatter -> unit
Interruption tag.
val done_tag : Format.formatter -> unit
Done tag.
val tag_of_level : Format.formatter -> Lib.log_level -> unit