logger

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttrErr

func AttrErr(err error) slog.Attr

func Get

func Get(channel string, attrs ...any) *slog.Logger

func NewChanneledHandler

func NewChanneledHandler(h slog.Handler, channels map[string]slog.Leveler) slog.Handler

Types

type ChanneledHandler

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

func (*ChanneledHandler) Enabled

func (c *ChanneledHandler) Enabled(ctx context.Context, level slog.Level) bool

func (*ChanneledHandler) Handle

func (c *ChanneledHandler) Handle(ctx context.Context, record slog.Record) error

func (*ChanneledHandler) WithAttrs

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

func (*ChanneledHandler) WithGroup

func (c *ChanneledHandler) WithGroup(name string) slog.Handler

Jump to

Keyboard shortcuts

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