A Guzzle middleware to log request and responses automatically
HandlerInterface::log
to allow Throwables. Now the signature isHandlerInterface::log(
LoggerInterface $logger,
RequestInterface $request,
?ResponseInterface $response = null,
?Throwable $exception = null,
?TransferStats $stats = null,
array $options = []
)
FixedStrategy
BREAKING CHANGES
LogLevelStrategy
class is removed and it has been separated to smaller classes.
Check the added
section below.GuzzleLogMiddleware
instead of Gmponos\GuzzleLogger
.
Check the README file for instructions.HandlerInterface::log
.ArrayHandler
to MultiRecordArrayHandler
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.