Handler is an implementation of [slog.Handler] with support for hooks.
| 53 | |
| 54 | // Handler is an implementation of [slog.Handler] with support for hooks. |
| 55 | type Handler struct { |
| 56 | out io.Writer |
| 57 | config *Config |
| 58 | |
| 59 | mu *sync.Mutex // Mutex is shared between all instances |
| 60 | |
| 61 | groups []attrGroup |
| 62 | |
| 63 | hooks []Hook |
| 64 | } |
| 65 | |
| 66 | // NewHandler creates a new [Handler] instance. |
| 67 | func NewHandler(out io.Writer, config *Config) *Handler { |
nothing calls this directly
no outgoing calls
no test coverage detected