19 lines
378 B
OCaml
19 lines
378 B
OCaml
|
type level =
|
||
|
| TRACE (* 0 *)
|
||
|
| DEBUG (* 1 *)
|
||
|
| INFO (* 2 *)
|
||
|
| WARN (* 3 *)
|
||
|
| ERROR (* 4 *)
|
||
|
|
||
|
external int_of_level : level -> int = "%identity"
|
||
|
|
||
|
type writer =
|
||
|
timestamp:float ->
|
||
|
namespace:string ->
|
||
|
level:level ->
|
||
|
string -> unit
|
||
|
|
||
|
let ( +++ ) w1 w2 ~timestamp ~namespace ~level msg =
|
||
|
w1 ~timestamp ~namespace ~level msg;
|
||
|
w2 ~timestamp ~namespace ~level msg
|