Documentation
¶
Index ¶
- func InitLogger(cfg config.LoggingConfig) *slog.Logger
- func WithAgentID(logger *slog.Logger, id string) *slog.Logger
- func WithComponent(logger *slog.Logger, name string) *slog.Logger
- func WithMethod(logger *slog.Logger, method string) *slog.Logger
- func WithRequestID(logger *slog.Logger, id string) *slog.Logger
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 ¶
WithAgentID returns a child logger that includes an "agent_id" field.
func WithComponent ¶
WithComponent returns a child logger that includes a "component" field in every log record it produces.
func WithMethod ¶
WithMethod returns a child logger that includes a "method" field.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.