File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -110,9 +110,11 @@ type line struct {
110110//
111111// Prefer log.Error.F() to log.Error.Printf() unless using Add
112112func (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
You can’t perform that action at this time.
0 commit comments