HttpLogContext
final class HttpLogContext (View source)
Produces an allowlisted HTTP context that excludes query strings, cookies, bodies, and every header value except a validated request identifier.
Paths and request identifiers are bounded and normalized before they cross the framework logging boundary.
Constants
| private MAX_PATH_LENGTH |
|
| private MAX_REQUEST_ID_LENGTH |
|
Methods
Uses the shared request inspector to keep logging metadata normalization consistent.
Builds the safe request metadata shared by framework HTTP log records.
Extends request context with response status and non-negative processing duration.
Details
__construct
__construct(HttpRequestInspector $inspector)
Uses the shared request inspector to keep logging metadata normalization consistent.
request
array
request(ServerRequestInterface $request)
Builds the safe request metadata shared by framework HTTP log records.
requestResponse
array
requestResponse(ServerRequestInterface $request, ResponseInterface $response, int $durationMs)
Extends request context with response status and non-negative processing duration.