logger

package
v1.6.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2026 License: Apache-2.0 Imports: 6 Imported by: 6 modules, 8 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	LevelTrace = slog.Level(-8)
	LevelDebug = slog.LevelDebug
	LevelInfo  = slog.LevelInfo
	LevelWarn  = slog.LevelWarn
	LevelError = slog.LevelError
)

Variables

This section is empty.

Functions

func NewLevelHandler added in v1.6.21

func NewLevelHandler(handler slog.Handler, level slog.Leveler) slog.Handler

Types

type LevelHandler added in v1.6.21

type LevelHandler struct {
	// contains filtered or unexported fields
}

func (*LevelHandler) Enabled added in v1.6.21

func (h *LevelHandler) Enabled(ctx context.Context, level slog.Level) bool

func (*LevelHandler) Handle added in v1.6.21

func (h *LevelHandler) Handle(ctx context.Context, record slog.Record) error

func (*LevelHandler) WithAttrs added in v1.6.21

func (h *LevelHandler) WithAttrs(attrs []slog.Attr) slog.Handler

func (*LevelHandler) WithGroup added in v1.6.21

func (h *LevelHandler) WithGroup(name string) slog.Handler

type MultiHandler added in v1.6.21

type MultiHandler struct {
	// contains filtered or unexported fields
}

func NewMultiHandler added in v1.6.21

func NewMultiHandler(handlers ...slog.Handler) *MultiHandler

func (*MultiHandler) Enabled added in v1.6.21

func (h *MultiHandler) Enabled(ctx context.Context, level slog.Level) bool

func (*MultiHandler) Handle added in v1.6.21

func (h *MultiHandler) Handle(ctx context.Context, record slog.Record) error

func (*MultiHandler) WithAttrs added in v1.6.21

func (h *MultiHandler) WithAttrs(attrs []slog.Attr) slog.Handler

func (*MultiHandler) WithGroup added in v1.6.21

func (h *MultiHandler) WithGroup(name string) slog.Handler

type TermHandler

type TermHandler struct {
	io.Writer
	// contains filtered or unexported fields
}

func NewTermHandler added in v1.6.14

func NewTermHandler(w io.Writer, level *slog.LevelVar) *TermHandler

func (*TermHandler) Enabled

func (h *TermHandler) Enabled(ctx context.Context, level slog.Level) bool

func (*TermHandler) Handle

func (h *TermHandler) Handle(ctx context.Context, r slog.Record) error

func (*TermHandler) WithAttrs

func (h *TermHandler) WithAttrs(attrs []slog.Attr) slog.Handler

func (*TermHandler) WithGroup

func (h *TermHandler) WithGroup(name string) slog.Handler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL