Library
Module
Module type
Parameter
Class
Class type
The logged traces will be pretty-printed as trees using the `printbox` package. This logger supports conditionally disabling a particular nesting of the logs, regardless of where in the nesting level no_debug_if
is called.
When passed true within the scope of a log subtree, disables the logging of this subtree and its subtrees. Does not do anything when passed false (no_debug_if false
does not re-enable the log).
val default_html_config : PrintBox_html.Config.t
val default_md_config : PrintBox_md.Config.t
type config = {
mutable hyperlink : [ `Prefix of string | `No_hyperlinks ];
If hyperlink
is `Prefix prefix
, code pointers are rendered as hyperlinks. When prefix
is either empty, starts with a dot, or starts with "http:"
or "https:"
, the link address has the form sprintf "%s#L%d" fname start_lnum
, allowing browsing in HTML directly. Otherwise, it has the form sprintf "%s:%d:%d" fname start_lnum (start_colnum + 1)
, intended for editor-specific prefixes such as "vscode://file/"
.
Note that rendering a link on a node will make the node non-foldable, therefore it is best to combine `prefix prefix
with values_first_mode
.
mutable backend : [ `Text
| `Html of PrintBox_html.Config.t
| `Markdown of PrintBox_md.Config.t ];
If the content is `Text
, logs are generated as monospaced text; for other settings as html or markdown.
mutable boxify_sexp_from_size : int;
If positive, Sexp.t
-based logs with this many or more atoms are converted to print-boxes before logging.
mutable highlight_terms : Re.re option;
Uses a highlight style for logs on paths ending with a log matching the regular expression.
*)mutable exclude_on_path : Re.re option;
Does not propagate the highlight status from child logs through log headers matching the given regular expression.
*)mutable prune_upto : int;
At depths lower than prune_upto
(or equal if counting from 1) only ouptputs highlighted boxes. This makes it simpler to trim excessive logging while still providing some context. Defaults to 0
-- no pruning.
mutable truncate_children : int;
If > 0, only the given number of the most recent children is kept at each node. Defaults to 0
-- keep all (no pruning).
mutable values_first_mode : bool;
If set to true, does not put the source code location of a computation as a header of its subtree. Rather, puts the result of the computation as the header of a computation subtree, if rendered as a single line -- or just the name, and puts the result near the top. If false, puts the result at the end of the computation subtree, i.e. preserves the order of the computation.
*)mutable max_inline_sexp_size : int;
Maximal size (in atoms) up to which a sexp value can be inlined during "boxification".
*)mutable max_inline_sexp_length : int;
Maximal length (in characters/bytes) up to which a sexp value can be inlined during "boxification".
*)}
val config : config