Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
fix: reduce logging noise
Browse files Browse the repository at this point in the history
  • Loading branch information
miwurster committed Jan 19, 2023
1 parent c719d66 commit 7cd3b0a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions planqk/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ def get_access_token(self) -> str:
for credential in self.credentials:
try:
access_token = credential.get_access_token()
logger.info('%s acquired an access token from %s',
self.__class__.__name__, credential.__class__.__name__)
logger.debug('%s acquired an access token from %s',
self.__class__.__name__, credential.__class__.__name__)
return access_token
except CredentialUnavailableError:
logger.info('%s - %s is unavailable', self.__class__.__name__, credential.__class__.__name__)
logger.debug('%s - %s is unavailable', self.__class__.__name__, credential.__class__.__name__)
except Exception as e:
logger.info('%s.get_access_token() failed: %s raised unexpected error "%s"', self.__class__.__name__,
credential.__class__.__name__, e, exc_info=logger.isEnabledFor(logging.DEBUG))
logger.error('%s.get_access_token() failed: %s raised unexpected error "%s"', self.__class__.__name__,
credential.__class__.__name__, e, exc_info=logger.isEnabledFor(logging.DEBUG))

message = f'{self.__class__.__name__} failed to retrieve an access token'
logger.warning(message)
Expand Down

0 comments on commit 7cd3b0a

Please sign in to comment.