logx

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Component

func Component(l *slog.Logger, name string) *slog.Logger

func New

func New(opt Options) *slog.Logger

Types

type Options

type Options struct {
	Level  string
	Writer io.Writer

	Format string

	ReplaceAttr func(groups []string, a slog.Attr) slog.Attr

	// WrapHandler, when set, receives the fully built format handler and
	// returns the handler the logger should actually use. It is the
	// interception point for observability capture layers such as
	// logring.Wrap; stdout format and level semantics stay with the
	// wrapped handler.
	WrapHandler func(slog.Handler) slog.Handler
}

Jump to

Keyboard shortcuts

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