should returns true if the log event should be logged.
(lvl Level)
| 515 | |
| 516 | // should returns true if the log event should be logged. |
| 517 | func (l *Logger) should(lvl Level) bool { |
| 518 | if l.disabled() { |
| 519 | return false |
| 520 | } |
| 521 | if lvl < l.level || lvl < GlobalLevel() { |
| 522 | return false |
| 523 | } |
| 524 | if l.sampler != nil && !samplingDisabled() { |
| 525 | return l.sampler.Sample(lvl) |
| 526 | } |
| 527 | return true |
| 528 | } |
no test coverage detected