MCPcopy
hub / github.com/sirupsen/logrus / WithContext

Method WithContext

logger.go:138–142  ·  view source on GitHub ↗

WithContext add a context to the log entry.

(ctx context.Context)

Source from the content-addressed store, hash-verified

136
137// WithContext add a context to the log entry.
138func (logger *Logger) WithContext(ctx context.Context) *Entry {
139 entry := logger.newEntry()
140 defer logger.releaseEntry(entry)
141 return entry.WithContext(ctx)
142}
143
144// WithTime overrides the time of the log entry.
145func (logger *Logger) WithTime(t time.Time) *Entry {

Callers

nothing calls this directly

Calls 2

newEntryMethod · 0.95
releaseEntryMethod · 0.95

Tested by

no test coverage detected