diff --git a/cmd/golangci-lint/main.go b/cmd/golangci-lint/main.go index 6ec42e0c..e67d1e97 100644 --- a/cmd/golangci-lint/main.go +++ b/cmd/golangci-lint/main.go @@ -1,16 +1,10 @@ package main import ( - "log" - "github.com/golangci/golangci-lint/pkg/commands" - "github.com/sirupsen/logrus" ) func main() { - log.SetFlags(0) // don't print time - logrus.SetLevel(logrus.WarnLevel) - e := commands.NewExecutor() if err := e.Execute(); err != nil { panic(err) diff --git a/pkg/commands/root.go b/pkg/commands/root.go index 0a7b900c..3e7620ff 100644 --- a/pkg/commands/root.go +++ b/pkg/commands/root.go @@ -23,8 +23,11 @@ func (e *Executor) initRoot() { PersistentPreRun: func(cmd *cobra.Command, args []string) { runtime.GOMAXPROCS(e.cfg.Run.Concurrency) + log.SetFlags(0) // don't print time if e.cfg.Run.IsVerbose { logrus.SetLevel(logrus.InfoLevel) + } else { + logrus.SetLevel(logrus.WarnLevel) } if e.cfg.Run.CPUProfilePath != "" {