Skip to main content

Logging Middleware

PrismLoggingMiddleware prints a log line for every request, including the HTTP method, path, status code, and response time.

Setup

Enable Logging
Output:

Combine with Tracing

For production, pair logging with request tracing so every log line includes a unique request ID:
Traced Logging
Add logging middleware early in the stack to capture timing for the entire request lifecycle, including other middleware execution.