Adjust logrus default logging level to silence some containerd logs
This commit is contained in:
parent
b2cbaa3678
commit
eb66051aab
|
|
@ -6,6 +6,7 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus" // this is used by containerd libraries, so we need to set the default log level for it
|
||||
"github.com/urfave/cli"
|
||||
|
||||
"github.com/docker-library/bashbrew/architecture"
|
||||
|
|
@ -163,6 +164,11 @@ func main() {
|
|||
debugFlag = c.GlobalBool("debug")
|
||||
noSortFlag = c.GlobalBool("no-sort")
|
||||
|
||||
if !debugFlag {
|
||||
// containerd uses logrus, but it defaults to "info" (which is a bit leaky where we use containerd)
|
||||
logrus.SetLevel(logrus.WarnLevel)
|
||||
}
|
||||
|
||||
arch = c.GlobalString("arch")
|
||||
namespace = c.GlobalString("namespace")
|
||||
constraints = c.GlobalStringSlice("constraint")
|
||||
|
|
|
|||
1
go.mod
1
go.mod
|
|
@ -12,6 +12,7 @@ require (
|
|||
github.com/klauspost/compress v1.13.6 // indirect
|
||||
github.com/opencontainers/image-spec v1.0.2
|
||||
github.com/sergi/go-diff v1.2.0 // indirect
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/urfave/cli v1.22.5
|
||||
github.com/xanzy/ssh-agent v0.3.1 // indirect
|
||||
golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 // indirect
|
||||
|
|
|
|||
Loading…
Reference in New Issue