Skip to content

Commit

Permalink
Fix V() levels
Browse files Browse the repository at this point in the history
  • Loading branch information
etabak committed Apr 13, 2020
1 parent a8fcb69 commit 96ad8e1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions klog.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ func V(level Level) Verbose {
value := false
switch int(level) {
case 0:
value = currentLevel <= int(logrus.ErrorLevel)
value = currentLevel > int(logrus.ErrorLevel)
case 1:
value = currentLevel <= int(logrus.WarnLevel)
value = currentLevel > int(logrus.WarnLevel)
case 2:
value = currentLevel <= int(logrus.InfoLevel)
value = currentLevel > int(logrus.InfoLevel)
case 3:
value = currentLevel <= int(logrus.DebugLevel)
value = currentLevel > int(logrus.DebugLevel)
default:
value = currentLevel <= int(logrus.TraceLevel)
value = currentLevel > int(logrus.TraceLevel)
}
return Verbose(value)
}
Expand Down

0 comments on commit 96ad8e1

Please sign in to comment.