logging

package
v0.0.0-...-bc5b573 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DisableLogs log.Formatter = 255
View Source
const (
	ErrKey = "error_message"
)

Variables

View Source
var (
	ErrInvalidLevel  = errors.New("invalid log level")
	ErrInvalidFormat = errors.New("invalid log format")
)

Functions

func Setup

func Setup(lvlStr, fmtStr, outStr string) error

Types

type DiscardHandler

type DiscardHandler struct{}

DiscardHandler discards all log output. DiscardHandler.Enabled returns false for all Levels.

func (DiscardHandler) Enabled

func (d DiscardHandler) Enabled(ctx context.Context, level slog.Level) bool

func (DiscardHandler) Handle

func (d DiscardHandler) Handle(ctx context.Context, record slog.Record) error

func (DiscardHandler) WithAttrs

func (d DiscardHandler) WithAttrs(attrs []slog.Attr) slog.Handler

func (DiscardHandler) WithGroup

func (d DiscardHandler) WithGroup(name string) slog.Handler

Jump to

Keyboard shortcuts

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