DPanic logs a message at DPanicLevel. The message includes any fields passed at the log site, as well as any fields accumulated on the logger. If the logger is in development mode, it then panics (DPanic means "development panic"). This is useful for catching errors that are recoverable, but should
(msg string, fields ...Field)
| 271 | // "development panic"). This is useful for catching errors that are |
| 272 | // recoverable, but shouldn't ever happen. |
| 273 | func (log *Logger) DPanic(msg string, fields ...Field) { |
| 274 | if ce := log.check(DPanicLevel, msg); ce != nil { |
| 275 | ce.Write(fields...) |
| 276 | } |
| 277 | } |
| 278 | |
| 279 | // Panic logs a message at PanicLevel. The message includes any fields passed |
| 280 | // at the log site, as well as any fields accumulated on the logger. |