Skip to content

Commit

Permalink
#45 Ignore $debugLog argument in BaseCategory::getGuzzleHandlerStack()
Browse files Browse the repository at this point in the history
  • Loading branch information
uphlewis committed Apr 16, 2024
1 parent 2991d58 commit 184bd89
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/Provider/BaseCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,20 +125,17 @@ final public function getSystemInfo(): SystemInfo
}

/**
* Get a guzzle handler stack which logs requests/responses if provider is
* an instance of LogsDebugData and $debugLog === true. Requests and responses
* will also be stored in $this->guzzleHistory.
* Get a guzzle handler stack which logs requests/responses via the provider's
* injected PSR-3 logger.
*
* @param bool $debugLog @deprecated To be removed in a future version
*/
protected function getGuzzleHandlerStack(bool $debugLog = false): HandlerStack
{
$stack = HandlerStack::create();

$stack->push(Middleware::history($this->guzzleHistory));

if (!$debugLog || !$this instanceof LogsDebugData) {
return $stack;
}

// Rewinds HTTP message body seek position after the stream has been read by Logger middleware
$rewindMessageBody = function (MessageInterface $message) {
$message->getBody()->rewind();
Expand Down

0 comments on commit 184bd89

Please sign in to comment.