Documentation
¶
Index ¶
- Constants
- func OverrideLevel(h slog.Handler, newLevel slog.Leveler) (applied bool)
- type DynamicLevelHandler
- func (h *DynamicLevelHandler) Enabled(ctx context.Context, level slog.Level) bool
- func (h *DynamicLevelHandler) Handle(ctx context.Context, record slog.Record) error
- func (h *DynamicLevelHandler) Override(newLevel slog.Leveler)
- func (h *DynamicLevelHandler) Reset()
- func (h *DynamicLevelHandler) WithAttrs(attrs []slog.Attr) slog.Handler
- func (h *DynamicLevelHandler) WithGroup(name string) slog.Handler
Constants ¶
View Source
const LevelUnassigned slog.Level = math.MaxInt
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DynamicLevelHandler ¶
type DynamicLevelHandler struct {
// contains filtered or unexported fields
}
func New ¶
func New(h slog.Handler) *DynamicLevelHandler
func (*DynamicLevelHandler) Override ¶
func (h *DynamicLevelHandler) Override(newLevel slog.Leveler)
func (*DynamicLevelHandler) Reset ¶ added in v1.1.0
func (h *DynamicLevelHandler) Reset()
Click to show internal directories.
Click to hide internal directories.