[Libguestfs] [PATCH 4/4] OCaml tools: output messages into JSON for machine readable

Tomáš Golembiovský tgolembi at redhat.com
Wed Mar 27 14:09:50 UTC 2019


On Fri, 22 Mar 2019 16:33:43 +0100
Pino Toscano <ptoscano at redhat.com> wrote:

> When the machine readable mode is enabled, print all the messages
> (progress, info, warning, and errors) also as JSON in the machine
> readable stream: this way, users can easily parse the status of the
> OCaml tool, and report that back.
> 
> The formatting of the current date time into the RFC 3999 format is done
> in C, because of the lack of OCaml APIs for this.
> ---
>  common/mltools/Makefile.am     |  2 +-
>  common/mltools/tools_utils-c.c | 51 ++++++++++++++++++++++++++++++++++
>  common/mltools/tools_utils.ml  | 16 +++++++++++
>  lib/guestfs.pod                | 19 +++++++++++++
>  4 files changed, 87 insertions(+), 1 deletion(-)

ACK

-- 
Tomáš Golembiovský <tgolembi at redhat.com>




More information about the Libguestfs mailing list