logging

package
v0.0.0-...-a3cd39f Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppLogger *slog.Logger

AppLogger is the application-wide logger instance

Functions

func FromContext

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

FromContext retrieves a logger from the given context If no logger exists in the context, returns the default logger

func SetupLogger

func SetupLogger(env string) *slog.Logger

SetupLogger initializes the structured logger based on environment settings

func WithContext

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

WithContext stores a logger in the given context

func WithValues

func WithValues(logger *slog.Logger, attrs ...any) *slog.Logger

WithValues returns a new logger with additional context values

Types

This section is empty.

Jump to

Keyboard shortcuts

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