WithFields adds a struct of fields to the log entry. It calls [Entry.WithField] for each Field.
(fields Fields)
| 121 | // WithFields adds a struct of fields to the log entry. It calls [Entry.WithField] |
| 122 | // for each Field. |
| 123 | func (logger *Logger) WithFields(fields Fields) *Entry { |
| 124 | entry := logger.newEntry() |
| 125 | defer logger.releaseEntry(entry) |
| 126 | return entry.WithFields(fields) |
| 127 | } |
| 128 | |
| 129 | // WithError adds an error as single field to the log entry. It calls |
| 130 | // [Entry.WithError] for the given error. |