Skip to content

feat(backend): log method and url for each request#480

Merged
Harxhit merged 4 commits into
Dev-Card:mainfrom
qorexdevs:feat/issue-8-request-logging
Jun 7, 2026
Merged

feat(backend): log method and url for each request#480
Harxhit merged 4 commits into
Dev-Card:mainfrom
qorexdevs:feat/issue-8-request-logging

Conversation

@qorexdevs

Copy link
Copy Markdown
Contributor

Adds an onRequest hook that logs request.method and request.url via pino, plus a test spying on app.log.info.

closes #8

@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown

@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.

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

CI — All Checks Passed

Backend — PASS

Check Result
Lint PASS
Test PASS
Typecheck PASS

Mobile — SKIP

Check Result
Lint -
Test -

Web — SKIP

Check Result
Check -
Build -

Last updated: Sat, 06 Jun 2026 13:07:19 GMT

@qorexdevs

Copy link
Copy Markdown
Contributor Author

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.

@Harxhit Harxhit added the gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. label Jun 6, 2026
@qorexdevs

Copy link
Copy Markdown
Contributor Author

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.

@ShantKhatri ShantKhatri requested a review from Harxhit June 6, 2026 17:43

@Harxhit Harxhit left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Harxhit Harxhit merged commit b029358 into Dev-Card:main Jun 7, 2026
5 of 6 checks passed
@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown

Congratulations @qorexdevs on getting PR #480 merged!

    Thank you for your contribution. Please mention @Harxhit in our Discord server to receive the appropriate GSSoC labels and recognition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

backend: add request logging middleware for endpoints

2 participants