Module Observe_lwt_unix.Test

exception Capture_error of Observe.capture_error

A capture could not start. The callback is not called.

val with_capture_exn : config:Observe.Config.t -> ?capacity:int -> (Observe.Capture.t -> 'a Lwt.t) -> 'a Lwt.t

Run callback with an isolated Lwt-scoped capture of ordinary Observe.Logs calls.

The inner scope wins when scopes are nested. The prior scope is restored after success, exception, or Lwt.Canceled. A callback registered in the scope but run after closure cannot fall through to production. Bindings do not propagate through Lwt_preemptive.detach, OS threads, or another I/O implementation.