logging

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 3 Imported by: 0

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

func New(cfg config.Logging) *slog.Logger

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.

Jump to

Keyboard shortcuts

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