Releases: gmponos/guzzle-log-middleware
Releases · gmponos/guzzle-log-middleware
v0.4.0
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 aMessageInterface
an Exception is thrown. - Changed all the functions except of
__construct
and__invoke
to private. Same for the properties.
v0.3.0
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 tocomposer.json
v0.2.0
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
to6.*
. 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 withsummary
was added in the logs and also a key withbody
. Thebody
contained the wording
"Body was truncated because of it's size". This is changed now and thesummary
key is removed therefore thebody
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
.