log

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAttrs added in v1.0.3

func AddAttrs(ctx context.Context, attrs []slog.Attr)

func Attrs added in v1.0.3

func Attrs(ctx context.Context) []slog.Attr

func AttrsToArgs added in v1.0.3

func AttrsToArgs(attrs []slog.Attr) []any

func Logger

func Logger(ctx context.Context) *slog.Logger

func SetLogger

func SetLogger(ctx context.Context, logger *slog.Logger)

SetLogger set logger instance for current context. This is intended to be called from a custom resolver and is currently propagated to the current context and its children.

func WithLogger

func WithLogger(ctx context.Context, logger *slog.Logger, attrs ...slog.Attr) context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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