Agent: Add more debug logging to Agg'Prop'Cred'Repo'

This commit is contained in:
Mike Salvatore 2022-08-19 12:42:05 -04:00
parent 512403c1e0
commit 0864593176
1 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,7 @@ class AggregatingPropagationCredentialsRepository(IPropagationCredentialsReposit
def add_credentials(self, credentials_to_add: Iterable[Credentials]):
for credentials in credentials_to_add:
logger.debug("Adding credentials")
if credentials.identity:
self._add_identity(credentials.identity)
@ -62,6 +63,8 @@ class AggregatingPropagationCredentialsRepository(IPropagationCredentialsReposit
def get_credentials(self) -> PropagationCredentials:
try:
propagation_credentials = self._get_credentials_from_control_channel()
logger.debug(f"Received {len(propagation_credentials)} from the control channel")
self.add_credentials(propagation_credentials)
except Exception as ex:
logger.error(f"Error while attempting to retrieve credentials for propagation: {ex}")