Client: add Cli_entries.warning to log a message on stderr without raising exception
This commit is contained in:
parent
087a097cf7
commit
80e1b0f312
@ -361,6 +361,11 @@ let error fmt=
|
|||||||
Lwt.fail (Failure msg))
|
Lwt.fail (Failure msg))
|
||||||
fmt
|
fmt
|
||||||
|
|
||||||
|
let warning fmt =
|
||||||
|
Format.kasprintf
|
||||||
|
(fun msg -> log "stderr" msg)
|
||||||
|
fmt
|
||||||
|
|
||||||
let message fmt =
|
let message fmt =
|
||||||
Format.kasprintf
|
Format.kasprintf
|
||||||
(fun msg -> log "stdout" msg)
|
(fun msg -> log "stdout" msg)
|
||||||
|
@ -68,6 +68,7 @@ val dispatch:
|
|||||||
val log_hook : (string -> string -> unit Lwt.t) option ref
|
val log_hook : (string -> string -> unit Lwt.t) option ref
|
||||||
|
|
||||||
val error : ('a, Format.formatter, unit, 'b Lwt.t) format4 -> 'a
|
val error : ('a, Format.formatter, unit, 'b Lwt.t) format4 -> 'a
|
||||||
|
val warning : ('a, Format.formatter, unit, unit Lwt.t) format4 -> 'a
|
||||||
val message : ('a, Format.formatter, unit, unit Lwt.t) format4 -> 'a
|
val message : ('a, Format.formatter, unit, unit Lwt.t) format4 -> 'a
|
||||||
val answer : ('a, Format.formatter, unit, unit Lwt.t) format4 -> 'a
|
val answer : ('a, Format.formatter, unit, unit Lwt.t) format4 -> 'a
|
||||||
val log : string -> ('a, Format.formatter, unit, unit Lwt.t) format4 -> 'a
|
val log : string -> ('a, Format.formatter, unit, unit Lwt.t) format4 -> 'a
|
||||||
|
Loading…
Reference in New Issue
Block a user