Skip to content

feat: structured JSON request logging with status and duration#3

Closed
treezio wants to merge 1 commit into
mainfrom
feat/json-request-logging
Closed

feat: structured JSON request logging with status and duration#3
treezio wants to merge 1 commit into
mainfrom
feat/json-request-logging

Conversation

@treezio

@treezio treezio commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replaces plain-text log lines with structured JSON emitted on response finish
  • Each log entry includes: timestamp, method, path, status (HTTP status code), and durationMs
  • /healthz and /readyz endpoints remain excluded from logging
  • Bumps version to 1.0.2

Example log line:

{"timestamp":"2026-05-04T11:00:00.000Z","method":"POST","path":"/mcp","status":200,"durationMs":42}

Test plan

  • Start server with PORT set and send requests to /mcp — verify JSON log lines appear on stderr with correct status and duration
  • Hit /healthz and /readyz — verify no log output
  • Existing tests still pass (npm test)

🤖 Generated with Claude Code

Logs are now emitted as JSON on response finish, including method,
path, HTTP status code, and duration in ms. Bumps version to 1.0.2.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@treezio treezio closed this May 4, 2026
@treezio treezio deleted the feat/json-request-logging branch May 4, 2026 12:50
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