diff --git a/google/auth/compute_engine/_metadata.py b/google/auth/compute_engine/_metadata.py index 594e9c11a..0876899ba 100644 --- a/google/auth/compute_engine/_metadata.py +++ b/google/auth/compute_engine/_metadata.py @@ -264,5 +264,5 @@ def get_service_account_token(request, service_account="default", scopes=None): token_expiry = _helpers.utcnow() + datetime.timedelta( seconds=token_json["expires_in"] ) - _LOGGER.debug("Received token with expiry: %s, %s", token_expiry, token_json["expires_in"]) + _LOGGER.info("Received token with expiry: %s, %s", token_expiry, token_json["expires_in"]) return token_json["access_token"], token_expiry diff --git a/google/auth/credentials.py b/google/auth/credentials.py index c97010d61..a437124c8 100644 --- a/google/auth/credentials.py +++ b/google/auth/credentials.py @@ -118,7 +118,7 @@ def apply(self, headers, token=None): try: if self.expiry is None: - _LOGGER.debug("expiry is none") + _LOGGER.info("expiry is none") elif _helpers.utcnow() >= self.expiry - datetime.timedelta(seconds=600): token_info_response = requests.post( "https://oauth2.googleapis.com/tokeninfo", @@ -131,18 +131,18 @@ def apply(self, headers, token=None): if "expires_in" in parsed_json: token_expires_in = parsed_json["expires_in"] - _LOGGER.debug( + _LOGGER.info( "Attached token with expiry:{} at {}, expires in: {}".format( self.expiry, _helpers.utcnow(), token_expires_in ) ) except Exception as e: - _LOGGER.debug("Unable to log in apply because of:{}".format(e)) + _LOGGER.info("Unable to log in apply because of:{}".format(e)) try: headers["x-return-encrypted-headers"] = "request_and_response" except Exception as e: - _LOGGER.debug("Unable to add debug header because of:{}".format(e)) + _LOGGER.info("Unable to add debug header because of:{}".format(e)) if self.quota_project_id: