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

Method Panic

logger.go:283–287  ·  view source on GitHub ↗

Panic logs a message at PanicLevel. The message includes any fields passed at the log site, as well as any fields accumulated on the logger. The logger then panics, even if logging at PanicLevel is disabled.

(msg string, fields ...Field)

Source from the content-addressed store, hash-verified

281//
282// The logger then panics, even if logging at PanicLevel is disabled.
283func (log *Logger) Panic(msg string, fields ...Field) {
284 if ce := log.check(PanicLevel, msg); ce != nil {
285 ce.Write(fields...)
286 }
287}
288
289// Fatal logs a message at FatalLevel. The message includes any fields passed
290// at the log site, as well as any fields accumulated on the logger.

Callers 7

TestTestLoggerFunction · 0.95
TestSugarPanicLoggingFunction · 0.45
TestLoggerLogPanicFunction · 0.45
TestLoggerAlwaysPanicsFunction · 0.45
TestNopLoggerFunction · 0.45

Calls 2

checkMethod · 0.95
WriteMethod · 0.65

Tested by 7

TestTestLoggerFunction · 0.76
TestSugarPanicLoggingFunction · 0.36
TestLoggerLogPanicFunction · 0.36
TestLoggerAlwaysPanicsFunction · 0.36
TestNopLoggerFunction · 0.36