mirror of
https://github.com/ocaml-tracing/ocaml-trace.git
synced 2026-03-08 03:47:57 -04:00
feat tef: accept a out_channel directly in the collector
This commit is contained in:
parent
19b05542af
commit
ce27e2a411
2 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue