log

package
v0.0.0-...-042a1d3 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(ctx context.Context, closer io.Closer, description string)

Close wraps the basic Close method and logs error.

func CorrelationId

func CorrelationId(ctx context.Context) string

CorrelationId retrieves correlation id from the context.

func FromContext

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

FromContext returns logger from the context or noop implementation.

func IntoContext

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

IntoContext injects the given logger into context.

func New

func New(level string) *slog.Logger

New returns new configured slog.Logger instance.

func WithCorrelationId

func WithCorrelationId(ctx context.Context, id string) context.Context

WithCorrelationId injects correlation id into the context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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