slog

package
v0.0.0-...-3231604 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2025 License: MPL-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 CaptureHandler

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

CaptureHandler is a test helper that captures log records.

func NewCaptureHandler

func NewCaptureHandler(records *[]slog.Record) *CaptureHandler

NewCaptureHandler creates a new CaptureHandler that appends records to the provided slice.

func (*CaptureHandler) Enabled

func (h *CaptureHandler) Enabled(_ context.Context, _ slog.Level) bool

func (*CaptureHandler) Handle

func (h *CaptureHandler) Handle(_ context.Context, r slog.Record) error

func (*CaptureHandler) WithAttrs

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

func (*CaptureHandler) WithGroup

func (h *CaptureHandler) WithGroup(_ string) slog.Handler

Jump to

Keyboard shortcuts

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