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 19b05542af
commit ce27e2a411
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
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 path -> open_out path, true
| `File_append path -> | `File_append path ->
open_out_gen [ Open_creat; Open_wronly; Open_append ] 0o644 path, true open_out_gen [ Open_creat; Open_wronly; Open_append ] 0o644 path, true
| `Output oc -> oc, false
in in
let pid = let pid =
if !Mock_.enabled then if !Mock_.enabled then

View file

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