Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an option to to format logs in json format. This can be useful for programs running limactl that want to consume some content from the logs in the program own logs. Example: % _output/bin/limactl -h ... Flags: --debug debug mode -h, --help help for limactl --log-format string Set the logging format [text, json] (default "text") --log-level string Set the logging level [trace, debug, info, warn, error] ... % _output/bin/limactl start --log-format json --plain --vm-type vz --tty=false {"level":"info","msg":"Terminal is not available, proceeding without opening an editor","time":"2024-09-02T05:12:28+03:00"} {"level":"info","msg":"Starting the instance \"default\" with VM driver \"vz\"","time":"2024-09-02T05:12:28+03:00"} ... Discussed in #2576 Fixes #2583 Signed-off-by: Nir Soffer <nsoffer@redhat.com>