Guzzle Log Middleware Versions Save

A Guzzle middleware to log request and responses automatically

v2.2.0

2 years ago

v2.1.0

2 years ago

Changes

  • Allow PHP 8
  • Fix a deprecation on MultiRecordArrayHandler regarding query

v2.0.0

3 years ago

Changed

  • [BC] Changed the signature of HandlerInterface::log to allow Throwables. Now the signature is
HandlerInterface::log(
    LoggerInterface $logger,
    RequestInterface $request,
    ?ResponseInterface $response = null,
    ?Throwable $exception = null,
    ?TransferStats $stats = null,
    array $options = []
)
  • Allow guzzle 7

v1.1.0

4 years ago

Added

  • Added parameters in MultiRecordArrayHandler in order to customize the size truncated #25
  • MultiRecordArrayHandler will parse form requests as and log them as array #27

v1.0.1

4 years ago

Changes

  • Fixes #24. Body MUST rewind on huge responses.

v1.0.0

5 years ago

Changes

  • Added more classes of status codes to ThresholdStrategy

v0.8.0

5 years ago

Changes

  • Set as the default strategy in all handlers the FixedStrategy

BREAKING CHANGES

  • LogLevelStrategy class is removed and it has been separated to smaller classes. Check the added section below.
  • Changed the namespaces completely. The new Namespace is GuzzleLogMiddleware instead of Gmponos\GuzzleLogger. Check the README file for instructions.
  • Changed the signature of function HandlerInterface::log.
  • Changed ArrayHandler to MultiRecordArrayHandler

Added

  • FixedStrategy a strategy that you are able to set one level for all your logs.
  • ThresholdLevelStrategy a strategy that works with thresholds depending on the status code.
  • StatusCodeStrategy a strategy that you are able to set a specific log level per status code.

v0.7.0

5 years ago

Changed

  • BREAKING CHANGE Dropped support for PHP 5 and require PHP 7.2 as minimum version.

v0.6.0

5 years ago

Changed

  • BREAKING CHANGE Changed the constructor function of middleware. From now on you can pass a handler to it's constructor. Handlers are responsible for logging request/responses. Removed threshold argument.

v0.5.0

5 years ago

Changed

  • BREAKING CHANGE Renamed the variable $logRequestOnExceptionOnly to $onExceptionOnly. The purpose of this constructor argument was to log request and responses only if an exceptgition occurs. If you were manually setting this argument as true now you must set it as false as the variables meaning is inverted.
  • Deprecated the option requests. It will be removed on my next version.