Skip to content

feat: add pino-http request logging middleware#564

Merged
Jayy4rl merged 2 commits into
StellarYield:mainfrom
Majormaxx:fix/issue-510-pino-http
May 29, 2026
Merged

feat: add pino-http request logging middleware#564
Jayy4rl merged 2 commits into
StellarYield:mainfrom
Majormaxx:fix/issue-510-pino-http

Conversation

@Majormaxx
Copy link
Copy Markdown

Summary

Wires pino-http (already in dependencies) into app.ts before all routes, so every request produces a structured log line with method, URL, status code, and response time.

Changes — backend/src/app.ts

  • Imported { pinoHttp } from "pino-http" (named export avoids the CJS/ESM default-import callable issue under NodeNext module resolution)
  • Imported { logger } from "./logger.js"
  • Added app.use(pinoHttp({ logger })) as the first middleware, before express.json()

Changes — backend/src/api/controllers/vaults.ts

  • Fixed pre-existing lint error: renamed err_err in two unused catch variables (required for CI lint to pass)

Acceptance criteria

  • Each request produces a structured log line with method, url, statusCode, responseTime

Test plan

cd backend
npm run lint   # ✓ 0 errors
npm run build  # ✓ no TS errors
npm run test   # ✓ 55/55 tests pass

Closes #510

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@Majormaxx Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Jayy4rl Jayy4rl merged commit b042787 into StellarYield:main 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.

Configure pino-http request logging

2 participants