logging

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

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

FromContext extracts a structured logger from the context for reusability.

func NewLogger

func NewLogger() *slog.Logger

NewLogger returns a new structured logger.

func WithContext

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

WithContext returns a context with a logger in its values for reusability.

Types

This section is empty.

Jump to

Keyboard shortcuts

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