Skip to content

Commit

Permalink
Add support for logger in
Browse files Browse the repository at this point in the history
  • Loading branch information
Hectorhammett committed Oct 18, 2024
1 parent 56d3881 commit 202890d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ApplicationDefaultCredentials.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ public static function getMiddleware(
* user-defined scopes exist, expressed either as an Array or as a
* space-delimited string.
* @param string $universeDomain Specifies a universe domain to use for the
* calling client library
* calling client library.
* @param null|false|LoggerInterface $logger A PSR3 compliant LoggerInterface.
*
* @return FetchAuthTokenInterface
* @throws DomainException if no implementation can be obtained.
Expand All @@ -162,7 +163,8 @@ public static function getCredentials(
CacheItemPoolInterface $cache = null,
$quotaProject = null,
$defaultScope = null,
string $universeDomain = null
string $universeDomain = null,
null|false|LoggerInterface $logger = null,
) {
$creds = null;
$jsonKey = CredentialsLoader::fromEnv()
Expand All @@ -175,7 +177,7 @@ public static function getCredentials(
HttpClientCache::setHttpClient($client);
}

$httpHandler = HttpHandlerFactory::build($client);
$httpHandler = HttpHandlerFactory::build($client, $logger);
}

if (is_null($quotaProject)) {
Expand Down

0 comments on commit 202890d

Please sign in to comment.