feat(backend): log method and url for each request#480
Conversation
|
@qorexdevs is attempting to deploy a commit to the Prashantkumar Khatri's projects Team on Vercel. A member of the Team first needs to authorize it. |
CI — All Checks PassedBackend — PASS
Mobile — SKIP
Web — SKIP
Last updated: |
|
backend-ci red here is pre-existing on main, not from this change: typecheck fails in team.ts/error.util.ts (prisma client types) and lint flags app.ts lines unrelated to the hook (unused fastifyStatic import, import order, curly brace). The new request-logging test passes (2 passed). Can fold the app.ts lint cleanup into this PR if you want it green. |
|
turns out the typecheck failure was the ci never running prisma generate after the pnpm->npm migration, so tsc saw the stub client (no TeamRole, no Prisma error classes). added a postinstall script in apps/backend so npm install generates the client. backend-ci is green now, only the vercel auth check is left and that needs a team-side authorization. |
Harxhit
left a comment
There was a problem hiding this comment.
Looks good to me. The requested changes have been addressed, including the Prisma generate postinstall setup in package.json, and everything is working as expected. Approving the PR.
|
Congratulations @qorexdevs on getting PR #480 merged! |
Adds an onRequest hook that logs request.method and request.url via pino, plus a test spying on app.log.info.
closes #8