Skip to content

Releases: tiny-blocks/http-logging

Release list

v1.0.0

Choose a tag to compare

@gustavofreze gustavofreze released this 01 Jul 15:10
c7d477c
  • PSR-15 middleware that logs each HTTP exchange: request method, uri, query_parameters, and parsed body before the handler, then response status_code, duration_ms, and decoded JSON body after.
  • Logs successful responses at info level and 4xx/5xx responses at error level.
  • Measures request duration through a monotonic clock (tiny-blocks/time), unaffected by wall-clock adjustments and swappable for deterministic tests.
  • Propagates correlation_id into every log entry when the request carries a correlation identifier (tiny-blocks/http-correlation-id), wired through the fluent LogMiddleware::create()->withLogger(...)->build() API.