ocaml-trace/test/t1.ml
2023-06-08 23:47:52 -04:00

12 lines
392 B
OCaml

let run () =
for _i = 1 to 50 do
Trace.with_ ~__FUNCTION__ ~__FILE__ ~__LINE__ "outer.loop" @@ fun _sp ->
for _j = 2 to 5 do
Trace.with_ ~__FILE__ ~__LINE__ "inner.loop" @@ fun _sp ->
Trace.messagef ~__FILE__ ~__LINE__ (fun k -> k "hello %d %d" _i _j)
done
done
let () =
Trace_tef.Internal_.mock_all_ ();
Trace_tef.with_setup ~out:`Stdout @@ fun () -> run ()