Skip to content

fix(apirouter): log 4xx at Warn, keep 5xx at Error#932

Closed
alexluong wants to merge 1 commit into
mainfrom
alex/log-level-by-status
Closed

fix(apirouter): log 4xx at Warn, keep 5xx at Error#932
alexluong wants to merge 1 commit into
mainfrom
alex/log-level-by-status

Conversation

@alexluong

Copy link
Copy Markdown
Collaborator

Summary

  • internal/apirouter/logger_middleware.go: 4xx responses now log at Warn (was Info). 5xx stays at Error, <400 stays at Debug.

Test plan

  • go test ./internal/apirouter/...
  • Eyeball logs locally after make up — hit a 404 and a 500, confirm levels.

🤖 Generated with Claude Code

5xx already logs at Error; bumping 4xx from Info to Warn so client
errors stand out from normal traffic in log queries.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@alexluong alexluong closed this May 29, 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.

1 participant