callbackhandler

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackFunc

type CallbackFunc func(ctx context.Context, record *slog.Record) error

type Handler

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

func New

func New(wrappedHandler slog.Handler) *Handler

func (*Handler) DeregisterContextCallback

func (h *Handler) DeregisterContextCallback(callbackKey string)

func (*Handler) Enabled

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

func (*Handler) Handle

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

func (*Handler) RegisterContextCallback

func (h *Handler) RegisterContextCallback(callback CallbackFunc, callbackKey string) error

func (*Handler) WithAttrs

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

func (*Handler) WithGroup

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

Jump to

Keyboard shortcuts

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