Handler implements the slog.Handler by writing to a zap Core.
| 34 | |
| 35 | // Handler implements the slog.Handler by writing to a zap Core. |
| 36 | type Handler struct { |
| 37 | core zapcore.Core |
| 38 | name string // logger name |
| 39 | addCaller bool |
| 40 | addStackAt slog.Level |
| 41 | callerSkip int |
| 42 | |
| 43 | // List of unapplied groups. |
| 44 | // |
| 45 | // These are applied only if we encounter a real field |
| 46 | // to avoid creating empty namespaces -- which is disallowed by slog's |
| 47 | // usage contract. |
| 48 | groups []string |
| 49 | } |
| 50 | |
| 51 | // NewHandler builds a [Handler] that writes to the supplied [zapcore.Core] |
| 52 | // with options. |
nothing calls this directly
no outgoing calls
no test coverage detected