Skip to content

Releases: gmponos/guzzle-log-middleware

v0.4.0

12 Sep 19:55
402cfbf
Compare
Choose a tag to compare

Changed

  • Removed LoggerAwareTrait. Therefore the logger can not be set after the construction of the middleware.
  • Changed the variable name $logRequests of the constructor to $logRequestOnExceptionOnly.
  • In case a message is not an \Exception or a MessageInterface an Exception is thrown.
  • Changed all the functions except of __construct and __invoke to private. Same for the properties.

v0.3.0

23 Aug 06:24
Compare
Choose a tag to compare

Changed

  • The package was reading the headers of the Request/Response and if they contained application/json the body
    was parsed into an array in order to be better readable in the logger. This has changed to match a regular expression
    /application\/[\w\.\+]*(json)/ in order to catch more cases. Thanks @eduarguzher #4
  • According to PHPStorm indication the ext-json needs to be installed in order for the package to work. Therefore
    it was added as a requirement to composer.json

v0.2.0

24 Jun 19:48
Compare
Choose a tag to compare

0.2.0 - 2018-06-24

Added

  • A new option is added with key sensitive. When you make a request using guzzle you can set this option to true
    in order not to log the body of the request and response. Example:
$guzzle->get('/test', ['log' => ['sensitive' => true]]); 

Changed

  • Changed the required version of guzzle from ^6.3 to 6.*. Package should be able to work without constraints.
  • For performance reasons when a body of a request/response is bigger than 3500 characters the body is truncated.
    Before a key with summary was added in the logs and also a key with body. The body contained the wording
    "Body was truncated because of it's size". This is changed now and the summary key is removed therefore the body
    key will contain the summary from now on.
  • If a Stream is not seekable or readable the body can not be logged. A wording is added instead in the key body.

v0.1.0

19 Jun 17:47
Compare
Choose a tag to compare

I saw on packagist that this package lately has 2000 downloads.

Although they are not so many I thought that it deserves a release to be tagged if someone wants to lock on the current release.

I will soon make big changes to the package.