Documentation
¶
Overview ¶
Package logging builds the gateway's structured slog.Logger from telemetry.logging: config (spec.md §7), per the FEATURE-021 acceptance criterion: every request logs at info with tool name, backend, outcome, and latency as structured fields; errors log at warn/error with the mapped JSON-RPC code. This package only builds the *slog.Logger itself — what gets logged and at what level is proxy.Middleware's own call, since that's where the request outcome is known.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New builds a *slog.Logger writing to os.Stdout, in the format and at the minimum level cfg specifies. cfg is assumed already validated by config.Parse (only the level/format values it accepts ever reach here); an unrecognized level defaults to info, and any format other than "text" produces JSON — the same fallback config.Parse's own validation exists to make unreachable in practice.
Types ¶
This section is empty.