logging

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogger

func InitLogger(cfg config.LoggingConfig) *slog.Logger

InitLogger creates and returns a *slog.Logger configured from cfg. The returned logger writes to stderr.

func WithAgentID

func WithAgentID(logger *slog.Logger, id string) *slog.Logger

WithAgentID returns a child logger that includes an "agent_id" field.

func WithComponent

func WithComponent(logger *slog.Logger, name string) *slog.Logger

WithComponent returns a child logger that includes a "component" field in every log record it produces.

func WithMethod

func WithMethod(logger *slog.Logger, method string) *slog.Logger

WithMethod returns a child logger that includes a "method" field.

func WithRequestID

func WithRequestID(logger *slog.Logger, id string) *slog.Logger

WithRequestID returns a child logger that includes a "request_id" field.

Types

This section is empty.

Jump to

Keyboard shortcuts

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