logging

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package logging provides structured logging utilities for stats-agent-team. It uses log/slog with context propagation following the pattern from CLAUDE.md.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugLogger

func DebugLogger() *slog.Logger

DebugLogger returns a logger with debug level enabled.

func DefaultLogger

func DefaultLogger() *slog.Logger

DefaultLogger returns the default logger configured for the application. Uses JSON handler for production-ready structured logging.

func FromContext

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

FromContext retrieves the logger from context. If no logger is found, returns the default logger.

func JSONLogger

func JSONLogger() *slog.Logger

JSONLogger returns a logger with JSON output format.

func NewAgentContext

func NewAgentContext(agentName string) context.Context

NewAgentContext creates a context with an agent-specific logger.

func NewAgentLogger

func NewAgentLogger(agentName string) *slog.Logger

NewAgentLogger creates a logger configured for a specific agent.

func WithComponent

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

WithComponent returns a logger with a component attribute for agent identification.

func WithLogger

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

WithLogger returns a new context with the given logger attached.

Types

This section is empty.

Jump to

Keyboard shortcuts

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