handler

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler() *Handler

func (*Handler) Enabled

func (h *Handler) Enabled(_ context.Context, level slog.Level) bool

func (*Handler) Handle

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

func (*Handler) WithAttrs

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

func (*Handler) WithColor

func (h *Handler) WithColor(colorOn bool) *Handler

func (*Handler) WithColorMode

func (h *Handler) WithColorMode(cm common.ColorMode) *Handler

func (*Handler) WithGroup

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

func (*Handler) WithHandlers

func (h *Handler) WithHandlers(handlers []slog.Handler) *Handler

func (*Handler) WithLevel

func (h *Handler) WithLevel(level slog.Level) *Handler

func (*Handler) WithLeveler

func (h *Handler) WithLeveler(level slog.Leveler) *Handler

func (*Handler) WithSource

func (h *Handler) WithSource(s bool) *Handler

func (*Handler) WithTime

func (h *Handler) WithTime(t bool) *Handler

func (*Handler) WithTimeFormat

func (h *Handler) WithTimeFormat(t string) *Handler

func (*Handler) WithUptime

func (h *Handler) WithUptime(u bool) *Handler

func (*Handler) WithWriter

func (h *Handler) WithWriter(out io.Writer) *Handler

Jump to

Keyboard shortcuts

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