20 lines
317 B
OCaml
20 lines
317 B
OCaml
type level =
|
|
| TRACE (* 0 *)
|
|
| DEBUG (* 1 *)
|
|
| INFO (* 2 *)
|
|
| WARN (* 3 *)
|
|
| ERROR (* 4 *)
|
|
|
|
external int_of_level : level -> int = "%identity"
|
|
|
|
type writer =
|
|
ts:Time.t ->
|
|
ns:string ->
|
|
lvl:level ->
|
|
string ->
|
|
unit
|
|
|
|
let ( +++ ) w1 w2 ~ts ~ns ~lvl msg =
|
|
w1 ~ts ~ns ~lvl msg;
|
|
w2 ~ts ~ns ~lvl msg
|