15 lines
389 B
Go
15 lines
389 B
Go
package zlog
|
|
|
|
import (
|
|
"context"
|
|
"log/slog"
|
|
)
|
|
|
|
// Null is a no-op log handler.
|
|
type Null struct{}
|
|
|
|
func (Null) Enabled(context.Context, slog.Level) bool { return false }
|
|
func (Null) Handle(context.Context, slog.Record) error { return nil }
|
|
func (Null) WithAttrs([]slog.Attr) slog.Handler { return Null{} }
|
|
func (nu Null) WithGroup(string) slog.Handler { return Null{} }
|