Skip to content

Commit

Permalink
Fix logic for disabling logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Hectorhammett committed Sep 20, 2024
1 parent 7e76353 commit ac4d686
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/HttpHandler/Guzzle6HttpHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Guzzle6HttpHandler
private $client;

/**
* @var LoggerInterface
* @var null|LoggerInterface
*/
private $logger;

Expand Down
4 changes: 3 additions & 1 deletion src/HttpHandler/HttpHandlerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ public static function build(
$client = new Client(['handler' => $stack]);
}

if ($logger !== false) {
if ($logger === false) {
$logger = null;
} else {
$logger = $logger ?? ApplicationDefaultCredentials::getDefaultLogger();
}

Expand Down

0 comments on commit ac4d686

Please sign in to comment.