handler

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogitAttrsModeEnv added in v0.7.0

func LogitAttrsModeEnv() common.AttrsMode

func LogitColorModeEnv added in v0.3.0

func LogitColorModeEnv() common.ColorMode

func LogitLevelEnv added in v0.3.0

func LogitLevelEnv() slog.Level

func LogitSymbolSetEnv added in v0.3.0

func LogitSymbolSetEnv() common.SymbolSet

func LogitTimeFormatEnv added in v0.3.0

func LogitTimeFormatEnv() string

func LogitUptimeFormatEnv added in v0.3.0

func LogitUptimeFormatEnv() common.UptimeFormat

func LogitWriterEnv added in v0.3.0

func LogitWriterEnv() io.Writer

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) WithReplaceAttr added in v0.4.0

func (h *Handler) WithReplaceAttr(replaceAttr common.ReplaceAttr) *Handler

func (*Handler) WithSymbolSet added in v0.2.0

func (h *Handler) WithSymbolSet(symbolSet common.SymbolSet) *Handler

func (*Handler) WithTimeFormat

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

func (*Handler) WithTpl added in v0.2.0

func (h *Handler) WithTpl(tpl ...common.Tpl) *Handler

func (*Handler) WithUptimeFormat added in v0.2.0

func (h *Handler) WithUptimeFormat(uptimeFmt common.UptimeFormat) *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