logger

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelCritical slog.Level = slog.Level(12)
)

Variables

This section is empty.

Functions

func AppendCtx

func AppendCtx(parent context.Context, attr slog.Attr) context.Context

func NewGoogleLogger added in v1.1.9

func NewGoogleLogger(opts *GoogleHandlerOptions) *slog.Logger

func NewPrettyLogger added in v1.1.9

func NewPrettyLogger(opts *PrettyHandlerOptions) *slog.Logger

Types

type GoogleHandler added in v1.1.9

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

func NewGoogleHandler added in v1.1.9

func NewGoogleHandler(opts *GoogleHandlerOptions) *GoogleHandler

func (*GoogleHandler) Enabled added in v1.1.9

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

func (*GoogleHandler) Handle added in v1.1.9

func (h *GoogleHandler) Handle(ctx context.Context, r slog.Record) error

func (*GoogleHandler) WithAttrs added in v1.1.9

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

func (*GoogleHandler) WithGroup added in v1.1.9

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

type GoogleHandlerOptions added in v1.1.9

type GoogleHandlerOptions struct {
	Level slog.Leveler
}

type PrettyHandler

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

func NewPrettyHandler

func NewPrettyHandler(opts *PrettyHandlerOptions) *PrettyHandler

func (*PrettyHandler) Enabled added in v1.1.9

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

func (*PrettyHandler) Handle

func (h *PrettyHandler) Handle(ctx context.Context, r slog.Record) error

func (*PrettyHandler) WithAttrs added in v1.1.9

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

func (*PrettyHandler) WithGroup added in v1.1.9

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

type PrettyHandlerOptions

type PrettyHandlerOptions struct {
	Level slog.Leveler
}

Jump to

Keyboard shortcuts

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