WithError adds an error as single field to the log entry. It calls [Entry.WithError] for the given error.
(err error)
| 129 | // WithError adds an error as single field to the log entry. It calls |
| 130 | // [Entry.WithError] for the given error. |
| 131 | func (logger *Logger) WithError(err error) *Entry { |
| 132 | entry := logger.newEntry() |
| 133 | defer logger.releaseEntry(entry) |
| 134 | return entry.WithError(err) |
| 135 | } |
| 136 | |
| 137 | // WithContext add a context to the log entry. |
| 138 | func (logger *Logger) WithContext(ctx context.Context) *Entry { |
nothing calls this directly
no test coverage detected