diff --git a/src/utils/cli_entries.ml b/src/utils/cli_entries.ml index c7071af56..9cca0bd66 100644 --- a/src/utils/cli_entries.ml +++ b/src/utils/cli_entries.ml @@ -361,6 +361,11 @@ let error fmt= Lwt.fail (Failure msg)) fmt +let warning fmt = + Format.kasprintf + (fun msg -> log "stderr" msg) + fmt + let message fmt = Format.kasprintf (fun msg -> log "stdout" msg) diff --git a/src/utils/cli_entries.mli b/src/utils/cli_entries.mli index 209289a3b..1b431e0c8 100644 --- a/src/utils/cli_entries.mli +++ b/src/utils/cli_entries.mli @@ -68,6 +68,7 @@ val dispatch: val log_hook : (string -> string -> unit Lwt.t) option ref 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 answer : ('a, Format.formatter, unit, unit Lwt.t) format4 -> 'a val log : string -> ('a, Format.formatter, unit, unit Lwt.t) format4 -> 'a