final class HttpRequestLogger (View source)

Records completed HTTP exchanges that satisfy the configured request-log threshold.

Methods

Connects logging policy, channel selection, and structured HTTP context generation.

void
log(ServerRequestInterface $request, ResponseInterface $response, HttpMetrics $metrics)

Logs an eligible completed response using the common HTTP duration, rounded to integer milliseconds.

void

Details

__construct

__construct(LoggingConfig $config, LogManager $logs, HttpLogContext $context)

Connects logging policy, channel selection, and structured HTTP context generation.

Parameters

LoggingConfig $config
LogManager $logs
HttpLogContext $context

log

void log(ServerRequestInterface $request, ResponseInterface $response, HttpMetrics $metrics)

Logs an eligible completed response using the common HTTP duration, rounded to integer milliseconds.

Parameters

ServerRequestInterface $request
ResponseInterface $response
HttpMetrics $metrics

Return Value

void