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 ¶
- func DebugLogger() *slog.Logger
- func DefaultLogger() *slog.Logger
- func FromContext(ctx context.Context) *slog.Logger
- func JSONLogger() *slog.Logger
- func NewAgentContext(agentName string) context.Context
- func NewAgentLogger(agentName string) *slog.Logger
- func WithComponent(logger *slog.Logger, component string) *slog.Logger
- func WithLogger(ctx context.Context, logger *slog.Logger) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugLogger ¶
DebugLogger returns a logger with debug level enabled.
func DefaultLogger ¶
DefaultLogger returns the default logger configured for the application. Uses JSON handler for production-ready structured logging.
func FromContext ¶
FromContext retrieves the logger from context. If no logger is found, returns the default logger.
func JSONLogger ¶
JSONLogger returns a logger with JSON output format.
func NewAgentContext ¶
NewAgentContext creates a context with an agent-specific logger.
func NewAgentLogger ¶
NewAgentLogger creates a logger configured for a specific agent.
func WithComponent ¶
WithComponent returns a logger with a component attribute for agent identification.
Types ¶
This section is empty.