MCPcopy
hub / github.com/uber-go/zap / Error

Method Error

logger.go:261–265  ·  view source on GitHub ↗

Error logs a message at ErrorLevel. The message includes any fields passed at the log site, as well as any fields accumulated on the logger.

(msg string, fields ...Field)

Source from the content-addressed store, hash-verified

259// Error logs a message at ErrorLevel. The message includes any fields passed
260// at the log site, as well as any fields accumulated on the logger.
261func (log *Logger) Error(msg string, fields ...Field) {
262 if ce := log.check(ErrorLevel, msg); ce != nil {
263 ce.Write(fields...)
264 }
265}
266
267// DPanic logs a message at DPanicLevel. The message includes any fields
268// passed at the log site, as well as any fields accumulated on the logger.

Callers 15

TestIncreaseLevelFunction · 0.45
serveHTTPMethod · 0.45
runMethod · 0.45
TestLoggerIncreaseLevelFunction · 0.45
TestNopLoggerFunction · 0.45
TestOpenPathsNotFoundFunction · 0.45
TestOpenFailsFunction · 0.45
TestOpenOtherErrorsFunction · 0.45

Calls 2

checkMethod · 0.95
WriteMethod · 0.65

Tested by 15

TestIncreaseLevelFunction · 0.36
runMethod · 0.36
TestLoggerIncreaseLevelFunction · 0.36
TestNopLoggerFunction · 0.36
TestOpenPathsNotFoundFunction · 0.36
TestOpenFailsFunction · 0.36
TestOpenOtherErrorsFunction · 0.36