MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / commit

Method commit

pkg/log/logger.go:66–81  ·  view source on GitHub ↗

commit comits the entry to the handler.

(e *entry)

Source from the content-addressed store, hash-verified

64
65// commit comits the entry to the handler.
66func (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.
84func (l *Logger) Debug(args ...any) {

Callers 5

DebugMethod · 0.45
InfoMethod · 0.45
WarnMethod · 0.45
ErrorMethod · 0.45
FatalMethod · 0.45

Calls 2

HandleLogMethod · 0.65
LevelMethod · 0.65

Tested by

no test coverage detected