mirror of
https://github.com/ocaml-tracing/ocaml-trace.git
synced 2026-03-07 18:37:56 -05:00
fix trace-tef.tldr: turn TEF path to an absolute one
This commit is contained in:
parent
3f28b8032a
commit
ba6861630d
1 changed files with 7 additions and 0 deletions
|
|
@ -64,6 +64,13 @@ let find_role ~out () : role =
|
||||||
Some { trace_id; emit_tef_at_exit = None; socket = get_unix_socket () }
|
Some { trace_id; emit_tef_at_exit = None; socket = get_unix_socket () }
|
||||||
| None ->
|
| None ->
|
||||||
let write_to_file path =
|
let write_to_file path =
|
||||||
|
(* normalize path so the daemon knows what we're talking about *)
|
||||||
|
let path =
|
||||||
|
if Filename.is_relative path then
|
||||||
|
Filename.concat (Unix.getcwd ()) path
|
||||||
|
else
|
||||||
|
path
|
||||||
|
in
|
||||||
let trace_id = create_trace_id () in
|
let trace_id = create_trace_id () in
|
||||||
Unix.putenv env_var_trace_id trace_id;
|
Unix.putenv env_var_trace_id trace_id;
|
||||||
{ trace_id; emit_tef_at_exit = Some path; socket = get_unix_socket () }
|
{ trace_id; emit_tef_at_exit = Some path; socket = get_unix_socket () }
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue