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

Method Error

log.go:369–371  ·  log.go::Logger.Error

Error starts a new message with error level. You must call Msg on the returned event in order to send the event.

()

Source from the content-addressed store, hash-verified

367//
368// You must call Msg on the returned event in order to send the event.
369func (l *Logger) Error() *Event {
370 return l.newEvent(ErrorLevel, nil)
371}
372
373// Err starts a new message with error level with err as a field if not nil or
374// with info level if err is nil.

Callers 15

ErrMethod · 0.95
WithLevelMethod · 0.95
ExampleLogger_LevelFunction · 0.45
ExampleLogger_ErrorFunction · 0.45
TestLevelWriterFunction · 0.45
TestDisabledLevelFunction · 0.45
TestPanicLevelFunction · 0.45
TestFatalDisabledFunction · 0.45
TestPanicDisabledFunction · 0.45

Calls 1

newEventMethod · 0.95

Tested by 15

ExampleLogger_LevelFunction · 0.36
ExampleLogger_ErrorFunction · 0.36
TestLevelWriterFunction · 0.36
TestDisabledLevelFunction · 0.36
TestPanicLevelFunction · 0.36
TestFatalDisabledFunction · 0.36
TestPanicDisabledFunction · 0.36