MCPcopy
hub / github.com/op/go-logging / Log

Method Log

level.go:112–119  ·  view source on GitHub ↗
(level Level, calldepth int, rec *Record)

Source from the content-addressed store, hash-verified

110}
111
112func (l *moduleLeveled) Log(level Level, calldepth int, rec *Record) (err error) {
113 if l.IsEnabledFor(level, rec.Module) {
114 // TODO get rid of traces of formatter here. BackendFormatter should be used.
115 rec.formatter = l.getFormatterAndCacheCurrent()
116 err = l.backend.Log(level, calldepth+1, rec)
117 }
118 return
119}
120
121func (l *moduleLeveled) getFormatterAndCacheCurrent() Formatter {
122 l.once.Do(func() {

Callers

nothing calls this directly

Calls 3

IsEnabledForMethod · 0.95
LogMethod · 0.65

Tested by

no test coverage detected