log

package
v0.0.0-...-6b08371 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorLogKey = "error"

Functions

func ErrorField

func ErrorField(err error) errorField

func SetupLog

func SetupLog(logLevel slog.Level)

Types

type ContextHandler

type ContextHandler struct {
	slog.Handler
}

func (ContextHandler) Handle

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

func (ContextHandler) WithAttrs

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

func (ContextHandler) WithGroup

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

Jump to

Keyboard shortcuts

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