Skip to content

[Backend] Implement LoggingMiddleware #133

Description

@Muhammadcodes112

Description

Basic request logging — method, path, status code, response time — for every incoming request.

Where

astre_server/src/common/logging.middleware.ts (new file)

What to implement

A class implementing NestMiddleware that logs ${method} ${originalUrl} ${statusCode} - ${responseTime}ms when the response finishes (hook into the response's finish event).

Acceptance Criteria

  • Every request produces exactly one log line
  • The logged line includes method, path, status code, and response time
  • npm run build compiles cleanly

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendNestJS API (astre_server)good first issueGood for newcomersphase-1Core donation-loop MVP (1/3 scope), builds on mvp-phase-1 branch

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions