commit comits the entry to the handler.
(e *entry)
| 64 | |
| 65 | // commit comits the entry to the handler. |
| 66 | func (l *Logger) commit(e *entry) { |
| 67 | handler := l.stack |
| 68 | if handler == nil { |
| 69 | handler = l.Handler |
| 70 | } |
| 71 | |
| 72 | if handler != nil && l.Level <= e.level { |
| 73 | l.mutex.RLock() |
| 74 | defer l.mutex.RUnlock() |
| 75 | _ = handler.HandleLog(e) |
| 76 | } |
| 77 | |
| 78 | if e.Level() == FatalLevel { |
| 79 | os.Exit(1) |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | // Debug implements log.Interface. |
| 84 | func (l *Logger) Debug(args ...any) { |