package ppx_minidebug

  1. Overview
  2. Docs

Module Minidebug_db.DatabaseBackendSource

Database backend implementing Debug_runtime interface

Parameters

module _ : Db_config

Signature

Sourceval close_log : fname:string -> start_lnum:int -> scope_id:int -> unit
Sourceval open_log : fname:string -> start_lnum:int -> start_colnum:int -> end_lnum:int -> end_colnum:int -> message:string -> scope_id:int -> log_level:int -> [ `Diagn | `Debug | `Track ] -> unit
Sourceval open_log_no_source : message:string -> scope_id:int -> log_level:int -> [ `Diagn | `Debug | `Track ] -> unit
Sourceval log_value_sexp : ?descr:string -> scope_id:int -> log_level:int -> is_result:bool -> Sexplib0.Sexp.t Lazy.t -> unit
Sourceval log_value_pp : ?descr:string -> scope_id:int -> log_level:int -> pp:(Format.formatter -> 'a -> unit) -> is_result:bool -> 'a Lazy.t -> unit
Sourceval log_value_show : ?descr:string -> scope_id:int -> log_level:int -> is_result:bool -> string Lazy.t -> unit
Sourceval log_value_printbox : scope_id:int -> log_level:int -> PrintBox.t -> unit
Sourceval exceeds_max_nesting : unit -> bool
Sourceval exceeds_max_children : unit -> bool
Sourceval get_scope_id : unit -> int
Sourceval max_nesting_depth : int option ref
Sourceval max_num_children : int option ref
Sourceval global_prefix : string
Sourceval snapshot : unit -> unit

For PrintBox runtimes, outputs the current logging stack to the logging channel. If the logging channel supports that, an output following a snapshot will rewind the channel to the state prior to the snapshot. Does nothing for the Flushing runtimes.

Sourceval finish_and_cleanup : unit -> unit

Snapshots any pending logs and closes any open files. This should be called at the end of the program to ensure all logs are properly flushed and files are closed. Do not call this function if there is a chance that the backend will be used again.

Sourceval no_debug_if : bool -> unit

When passed true within the scope of a log subtree, discards past logs of this subtree: the current log entry and its subtrees. Currently, does not do anything when passed false (no_debug_if false does not re-enable the log). Since the entry header is deleted, the whole subtree will not be rendered.

Sourceval log_level : int ref

The runtime log level.

The log levels are used both at compile time, and for the PrintBox runtime. Not logging at compile time means the corresponding logging code is not generated; not logging at runtime means the logging state is not updated.