With adds a variadic number of fields to the logging context. It accepts a mix of strongly-typed Field objects and loosely-typed key-value pairs. When processing pairs, the first element of the pair is used as the field key and the second as the field value. For example, sugaredLogger.With(
(args ...interface{})
| 112 | // and execution continues. Passing an orphaned key triggers similar behavior: |
| 113 | // panics in development and errors in production. |
| 114 | func (s *SugaredLogger) With(args ...interface{}) *SugaredLogger { |
| 115 | return &SugaredLogger{base: s.base.With(s.sweetenFields(args)...)} |
| 116 | } |
| 117 | |
| 118 | // WithLazy adds a variadic number of fields to the logging context lazily. |
| 119 | // The fields are evaluated only if the logger is further chained with [With] |
nothing calls this directly
no test coverage detected