WithError adds an error as single field (using the key defined in [ErrorKey]) to the Entry.
(err error)
| 107 | // WithError adds an error as single field (using the key defined in [ErrorKey]) |
| 108 | // to the Entry. |
| 109 | func (entry *Entry) WithError(err error) *Entry { |
| 110 | return entry.WithField(ErrorKey, err) |
| 111 | } |
| 112 | |
| 113 | // WithContext adds a context to the Entry. |
| 114 | func (entry *Entry) WithContext(ctx context.Context) *Entry { |