log

package
v0.27.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiStreamHandler added in v0.26.0

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

MultiStreamHandler slog handler for directing different

func New added in v0.26.0

func New(outLow, outHigh io.Writer, format string, opts *slog.HandlerOptions) *MultiStreamHandler

New returns new MultiStreamHandler

func (*MultiStreamHandler) Enabled added in v0.26.0

func (m *MultiStreamHandler) Enabled(ctx context.Context, level slog.Level) bool

Enabled check if log level is enabled

func (*MultiStreamHandler) Handle added in v0.26.0

func (m *MultiStreamHandler) Handle(ctx context.Context, r slog.Record) error

Handle pass to Low or High handlers based on log level

func (*MultiStreamHandler) WithAttrs added in v0.26.0

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

func (*MultiStreamHandler) WithGroup added in v0.26.0

func (m *MultiStreamHandler) WithGroup(string) slog.Handler

Jump to

Keyboard shortcuts

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