Skip to content

Add structured logging with configurable level and format#10

Merged
sebastientaggart merged 1 commit intomainfrom
feature/structured-logging
Apr 7, 2026
Merged

Add structured logging with configurable level and format#10
sebastientaggart merged 1 commit intomainfrom
feature/structured-logging

Conversation

@sebastientaggart
Copy link
Copy Markdown
Member

Adds structured logging with configurable log level and output format (plain or JSON), including a JSON formatter that emits standard fields and supports extra context.

Tests cover the JSON formatter output, extra context propagation, and idempotent configuration.

@sebastientaggart sebastientaggart linked an issue Apr 7, 2026 that may be closed by this pull request
4 tasks
@sebastientaggart
Copy link
Copy Markdown
Member Author

Review Summary

Verdict: APPROVE

Findings

No issues found. Code looks correct and follows project conventions.

  • Logging is configured after settings load, so config-driven level/format take effect from startup.
  • configure_logging is idempotent (clears existing handlers), matching its docstring and verified by tests.
  • JSON formatter correctly excludes reserved LogRecord attributes and propagates extra= context; default=str guards against non-serializable values.
  • Auth/rate-limit warning logs include useful context (client_ip, path, scope) without leaking secrets (token values not logged).
  • Env vars and TOML keys wired symmetrically with sensible defaults.

@sebastientaggart sebastientaggart merged commit 89c1e61 into main Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add structured logging with configurable levels

1 participant