You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 #2576Fixes#2583
Signed-off-by: Nir Soffer <[email protected]>
// TODO: "survey" does not support using cygwin terminal on windows yet
65
66
rootCmd.PersistentFlags().Bool("tty", isatty.IsTerminal(os.Stdout.Fd()), "Enable TUI interactions such as opening an editor. Defaults to true when stdout is a terminal. Set to false for automation.")
0 commit comments