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

Function WithContext

exported.go:60–62  ·  view source on GitHub ↗

WithContext creates an entry from the standard logger and adds a context to it.

(ctx context.Context)

Source from the content-addressed store, hash-verified

58
59// WithContext creates an entry from the standard logger and adds a context to it.
60func WithContext(ctx context.Context) *Entry {
61 return std.WithContext(ctx)
62}
63
64// WithField creates an entry from the standard logger and adds a field to
65// it. If you want multiple fields, use `WithFields`.

Callers 1

TestEntryWithContextFunction · 0.85

Calls 1

WithContextMethod · 0.45

Tested by 1

TestEntryWithContextFunction · 0.68