feat tef: accept a out_channel directly in the collector

This commit is contained in:
Simon Cruanes 2024-08-22 14:56:18 -04:00
parent 0b6dc27556
commit 62837c5193
2 changed files with 2 additions and 1 deletions

View file

@ -70,6 +70,7 @@ module Writer = struct
| `File path -> open_out path, true
| `File_append path ->
open_out_gen [ Open_creat; Open_wronly; Open_append ] 0o644 path, true
| `Output oc -> oc, false
in
let pid =
if !Mock_.enabled then

View file

@ -47,7 +47,7 @@ module Internal_ : sig
val collector_jsonl :
finally:(unit -> unit) ->
out:[ `File_append of string ] ->
out:[ `File_append of string | `Output of out_channel ] ->
unit ->
Trace_core.collector