Add --debug flag to kpod to turn up logging level to debug
Also set default level of logging to errors, we should not see info messages in the kpod command line. While adding this patch, I found missing options in kpod command line and bash completions, so I added them in. Also fixed some sorting issues in the way commands are displayer in help or in bash completions. Finally fixed the error message to be output on failure using logrus.Errorf, so we don't get the stack any longer. Also updated README.md with missing kpod commands. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
fb2ee59225
commit
464d6852de
6 changed files with 73 additions and 16 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
is "github.com/containers/image/storage"
|
||||
"github.com/containers/storage"
|
||||
"github.com/kubernetes-incubator/cri-o/libkpod"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
|
@ -46,5 +47,9 @@ func getConfig(c *cli.Context) (*libkpod.Config, error) {
|
|||
config.StorageOptions = opts
|
||||
}
|
||||
}
|
||||
if c.Bool("debug") {
|
||||
logrus.SetLevel(logrus.DebugLevel)
|
||||
}
|
||||
|
||||
return config, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue