@@ -139,11 +139,15 @@ func (h *GlogHandler) Vmodule(ruleset string) error {
139139 return nil
140140}
141141
142+ // Enabled implements slog.Handler, reporting whether the handler handles records
143+ // at the given level.
142144func (h * GlogHandler ) Enabled (ctx context.Context , lvl slog.Level ) bool {
143145 // fast-track skipping logging if override not enabled and the provided verbosity is above configured
144146 return h .override .Load () || slog .Level (h .level .Load ()) <= lvl
145147}
146148
149+ // WithAttrs implements slog.Handler, returning a new Handler whose attributes
150+ // consist of both the receiver's attributes and the arguments.
147151func (h * GlogHandler ) WithAttrs (attrs []slog.Attr ) slog.Handler {
148152 h .lock .RLock ()
149153 siteCache := maps .Clone (h .siteCache )
@@ -164,12 +168,16 @@ func (h *GlogHandler) WithAttrs(attrs []slog.Attr) slog.Handler {
164168 return & res
165169}
166170
171+ // WithGroup implements slog.Handler, returning a new Handler with the given
172+ // group appended to the receiver's existing groups.
173+ //
174+ // Note, this function is not implemented.
167175func (h * GlogHandler ) WithGroup (name string ) slog.Handler {
168176 panic ("not implemented" )
169177}
170178
171- // Log implements Handler.Log , filtering a log record through the global, local
172- // and backtrace filters, finally emitting it if either allow it through.
179+ // Handle implements slog.Handler , filtering a log record through the global,
180+ // local and backtrace filters, finally emitting it if either allow it through.
173181func (h * GlogHandler ) Handle (_ context.Context , r slog.Record ) error {
174182 // If the global log level allows, fast track logging
175183 if slog .Level (h .level .Load ()) <= r .Level {
0 commit comments