context

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger(ctx context.Context) zerolog.Logger

GetLogger retrieves the logger from the context. Returns a no-op logger if none is found, enabling graceful degradation rather than nil pointer panics.

func WithLogger

func WithLogger(ctx context.Context, logger zerolog.Logger) context.Context

WithLogger attaches a logger to the context for propagation through the request lifecycle. This enables commands and services to access logging without direct dependencies.

Types

This section is empty.

Jump to

Keyboard shortcuts

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