Merge pull request #527 from hqhq/del_def_log_level
Delete default log-level value
This commit is contained in:
commit
56460b93e4
1 changed files with 0 additions and 7 deletions
|
@ -43,10 +43,6 @@ func main() {
|
||||||
app.Version = containerd.Version
|
app.Version = containerd.Version
|
||||||
app.Usage = usage
|
app.Usage = usage
|
||||||
app.Flags = []cli.Flag{
|
app.Flags = []cli.Flag{
|
||||||
cli.BoolFlag{
|
|
||||||
Name: "debug",
|
|
||||||
Usage: "enable debug output in logs",
|
|
||||||
},
|
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "log-level",
|
Name: "log-level",
|
||||||
Usage: "Set the logging level [debug, info, warn, error, fatal, panic]",
|
Usage: "Set the logging level [debug, info, warn, error, fatal, panic]",
|
||||||
|
@ -110,9 +106,6 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func before(context *cli.Context) error {
|
func before(context *cli.Context) error {
|
||||||
if context.GlobalBool("debug") {
|
|
||||||
logrus.SetLevel(logrus.DebugLevel)
|
|
||||||
}
|
|
||||||
if l := context.GlobalString("log-level"); l != "" {
|
if l := context.GlobalString("log-level"); l != "" {
|
||||||
lvl, err := logrus.ParseLevel(l)
|
lvl, err := logrus.ParseLevel(l)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue