(e Entry, ce *CheckedEntry)
| 51 | } |
| 52 | |
| 53 | func (d *lazyWithCore) Check(e Entry, ce *CheckedEntry) *CheckedEntry { |
| 54 | // This is safe because `lazyWithCore` doesn't change the level. |
| 55 | // So we can delagate the level check, any not `initOnce` |
| 56 | // just for the check. |
| 57 | if !d.originalCore.Enabled(e.Level) { |
| 58 | return ce |
| 59 | } |
| 60 | d.initOnce() |
| 61 | return d.core.Check(e, ce) |
| 62 | } |
| 63 | |
| 64 | func (d *lazyWithCore) Enabled(level Level) bool { |
| 65 | // Like above, this is safe because `lazyWithCore` doesn't change the level. |