Module Shexp_process__.Debuggers.Logger

Log events synchronously using the given printer.

include S
type t
type ('a, 'b) prim_token
val before_prim : t ‑> ('a'bShexp_process.Prim.t ‑> ('a'bShexp_process.Prim.Args.t ‑> ('a'bprim_token

Called before the execution of a primitive. The S-expression is a representation of the primitive call, for instance (mkdir "foo").

val after_prim : t ‑> ('a'bShexp_process.Prim.t ‑> ('b, exn * Printexc.raw_backtrace) Pervasives.result ‑> ('a'bprim_token ‑> unit

Called after the execution of a primitive, with the result.

val user_exn : t ‑> exn ‑> Printexc.raw_backtrace ‑> unit

Register a user exception, i.e. when a bind raises.

val output : t ‑> string ‑> unit

Captured output

val fork : t ‑> t * t

Called before forking.

val end_fork : t ‑> t ‑> t ‑> unit

Called in the same thread that started the fork.

val enter_sub : t ‑> unit

Shexp tries to linearize the trace as much as possible. When an execution parameter is changed locally, such as in (chdir ...) >>= ..., a sub context is entered.

val leave_sub : t ‑> unit
val force_threads : bool

Force the use of threads in all forks, even when Shexp_process detect they are not necessary.

val create : (Shexp_sexp.Std.Sexp.t ‑> unit) ‑> t