Err starts a new message with error level with err as a field if not nil or with info level if err is nil. You must call Msg on the returned event in order to send the event.
(err error)
| 375 | // |
| 376 | // You must call Msg on the returned event in order to send the event. |
| 377 | func (l *Logger) Err(err error) *Event { |
| 378 | if err != nil { |
| 379 | return l.Error().Err(err) |
| 380 | } |
| 381 | |
| 382 | return l.Info() |
| 383 | } |
| 384 | |
| 385 | // Fatal starts a new message with fatal level. The FatalExitFunc interceptor function |
| 386 | // is called by the Msg method, which by default terminates the program immediately |