Fatal logs a message at FatalLevel. The message includes any fields passed at the log site, as well as any fields accumulated on the logger. The logger then calls os.Exit(1), even if logging at FatalLevel is disabled.
(msg string, fields ...Field)
| 292 | // The logger then calls os.Exit(1), even if logging at FatalLevel is |
| 293 | // disabled. |
| 294 | func (log *Logger) Fatal(msg string, fields ...Field) { |
| 295 | if ce := log.check(FatalLevel, msg); ce != nil { |
| 296 | ce.Write(fields...) |
| 297 | } |
| 298 | } |
| 299 | |
| 300 | // Sync calls the underlying Core's Sync method, flushing any buffered log |
| 301 | // entries. Applications should take care to call Sync before exiting. |