Skip to main content

log_request

Function log_request 

Source
pub async fn log_request(request: Request, next: Next) -> Response
Expand description

Middleware that logs every incoming HTTP request with method, path, status, and latency. 2xx/3xx log at info, 4xx/5xx at warn. /health and /metrics log at debug so probes don’t flood the default output.