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

Function WithFields

exported.go:79–81  ·  view source on GitHub ↗

WithFields creates an entry from the standard logger and adds multiple fields to it. This is simply a helper for `WithField`, invoking it once for each field. Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal or Panic on the Entry it returns.

(fields Fields)

Source from the content-addressed store, hash-verified

77// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal
78// or Panic on the Entry it returns.
79func WithFields(fields Fields) *Entry {
80 return std.WithFields(fields)
81}
82
83// WithTime creates an entry from the standard logger and overrides the time of
84// logs generated with it.

Callers 2

Calls 1

WithFieldsMethod · 0.65

Tested by 2