Skip to content

Commit

Permalink
Change from info to debug level
Browse files Browse the repository at this point in the history
  • Loading branch information
mayoor authored Dec 13, 2024
1 parent eab7c47 commit fd150cc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ads/common/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def create_signer(
"signer": signer,
"client_kwargs": client_kwargs,
}
logger.info(f"Using authentication signer type {type(signer)}.")
logger.debug(f"Using authentication signer type {type(signer)}.")
return signer_dict
else:
signer_args = dict(
Expand Down Expand Up @@ -492,7 +492,7 @@ def default_signer(client_kwargs: Optional[Dict] = None) -> Dict:
**(client_kwargs or {}),
},
}
logger.info(f"Using authentication signer type {type(signer)}.")
logger.debug(f"Using authentication signer type {type(signer)}.")
return signer_dict
else:
signer_args = dict(
Expand Down Expand Up @@ -621,7 +621,7 @@ def create_signer(self) -> Dict:
)

oci.config.validate_config(configuration)
logger.info(f"Using 'api_key' authentication.")
logger.debug(f"Using 'api_key' authentication.")
return {
"config": configuration,
"signer": oci.signer.Signer(
Expand Down Expand Up @@ -684,7 +684,7 @@ def create_signer(self) -> Dict:
"signer": oci.auth.signers.get_resource_principals_signer(),
"client_kwargs": self.client_kwargs,
}
logger.info(f"Using 'resource_principal' authentication.")
logger.debug(f"Using 'resource_principal' authentication.")
return signer_dict

@staticmethod
Expand Down Expand Up @@ -747,7 +747,7 @@ def create_signer(self) -> Dict:
),
"client_kwargs": self.client_kwargs,
}
logger.info(f"Using 'instance_principal' authentication.")
logger.debug(f"Using 'instance_principal' authentication.")
return signer_dict


Expand Down Expand Up @@ -814,7 +814,7 @@ def create_signer(self) -> Dict:
oci.config.from_file(self.oci_config_location, self.oci_key_profile)
)

logger.info(f"Using 'security_token' authentication.")
logger.debug(f"Using 'security_token' authentication.")

for parameter in self.SECURITY_TOKEN_REQUIRED:
if parameter not in configuration:
Expand Down Expand Up @@ -883,7 +883,7 @@ def _validate_and_refresh_token(self, configuration: Dict[str, Any]):
)

date_time = datetime.fromtimestamp(time_expired).strftime("%Y-%m-%d %H:%M:%S")
logger.info(f"Session is valid until {date_time}.")
logger.debug(f"Session is valid until {date_time}.")

def _read_security_token_file(self, security_token_file: str) -> str:
"""Reads security token from file.
Expand Down Expand Up @@ -1020,10 +1020,10 @@ def __enter__(self):
"""
if self.profile:
ads.set_auth(auth=AuthType.API_KEY, profile=self.profile)
logger.info(f"OCI profile set to {self.profile}")
logger.debug(f"OCI profile set to {self.profile}")
else:
ads.set_auth(auth=AuthType.RESOURCE_PRINCIPAL)
logger.info(f"OCI auth set to resource principal")
logger.debug(f"OCI auth set to resource principal")
return self

def __exit__(self, exc_type, exc_val, exc_tb):
Expand Down

0 comments on commit fd150cc

Please sign in to comment.