Enabled return false if the *Event is going to be filtered out by log level or sampling.
()
| 96 | // Enabled return false if the *Event is going to be filtered out by |
| 97 | // log level or sampling. |
| 98 | func (e *Event) Enabled() bool { |
| 99 | return e != nil && e.level != Disabled |
| 100 | } |
| 101 | |
| 102 | // Discard disables the event so Msg(f) won't print it. |
| 103 | func (e *Event) Discard() *Event { |