Skip to content

Commit

Permalink
Fix global quiet and verbose flags
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinHoksberg committed Oct 4, 2020
1 parent e85ab28 commit 610f0de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type Command struct{}
// GetLogger returns a logrus object according to any flags set
// in the application parameters.
func (c Command) GetLogger(cli *cli.Context) *log.Logger {
if cli.Bool("quiet") {
if cli.GlobalBool("quiet") {
logger, _ := test.NewNullLogger()
return logger
}
Expand All @@ -30,7 +30,7 @@ func (c Command) GetLogger(cli *cli.Context) *log.Logger {
log.SetFormatter(format)

// If the verbose flag was enabled, enable debug logging
if cli.Bool("verbose") {
if cli.GlobalBool("verbose") {
log.SetLevel(log.DebugLevel)
}

Expand Down

0 comments on commit 610f0de

Please sign in to comment.