MCPcopy
hub / github.com/rs/zerolog / Err

Method Err

log.go:377–383  ·  view source on GitHub ↗

Err starts a new message with error level with err as a field if not nil or with info level if err is nil. You must call Msg on the returned event in order to send the event.

(err error)

Source from the content-addressed store, hash-verified

375//
376// You must call Msg on the returned event in order to send the event.
377func (l *Logger) Err(err error) *Event {
378 if err != nil {
379 return l.Error().Err(err)
380 }
381
382 return l.Info()
383}
384
385// Fatal starts a new message with fatal level. The FatalExitFunc interceptor function
386// is called by the Msg method, which by default terminates the program immediately

Callers

nothing calls this directly

Calls 3

ErrorMethod · 0.95
InfoMethod · 0.95
ErrMethod · 0.65

Tested by

no test coverage detected