Skip to content

Commit 23d87dd

Browse files
committed
rename confusing var name
1 parent 109508d commit 23d87dd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

log.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,11 @@ type line struct {
110110
//
111111
// Prefer log.Error.F() to log.Error.Printf() unless using Add
112112
func (l line) Printf(f string, v ...interface{}) {
113-
checkDebug := l.Level == Debug.Level && !Config.DebugOn
114-
checkMinLevel := l.LevelInt < Config.MinLevel
115-
if checkDebug || checkMinLevel {
113+
// if msg is debug, checks if log msg should NOT be printed
114+
exitDebugMsg := l.Level == Debug.Level && !Config.DebugOn
115+
// for other levels, checks if log msg should NOT be printed based on min level
116+
exitMinLevelMsg := l.LevelInt < Config.MinLevel
117+
if exitDebugMsg || exitMinLevelMsg {
116118
// check to see if message matches any regex to allow message to be printed
117119
if !RegexPassthrough(f, v...) {
118120
return

0 commit comments

Comments
 (0)