Set logging format to JSON.

Signed-off-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Felix Fontein 2024-03-03 09:21:15 +01:00 committed by Nicolas De loof
parent 8f7cd00481
commit 2db04c1e40
1 changed files with 1 additions and 0 deletions

View File

@ -491,6 +491,7 @@ func RootCommand(dockerCli command.Cli, backend Backend) *cobra.Command { //noli
ui.Mode = ui.ModeQuiet
case ui.ModeJSON:
ui.Mode = ui.ModeJSON
logrus.SetFormatter(&logrus.JSONFormatter{})
default:
return fmt.Errorf("unsupported --progress value %q", opts.Progress)
}