From 9ab2c0bc6a27290c8aaf66ac44e473f3ece6c37f Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 23 Aug 2022 10:56:25 -0400 Subject: [PATCH] Agent: Add debug logging to add_creds_from_event_to_prop_creds_repo() --- .../credential_repository/add_credentials_from_event.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/monkey/infection_monkey/credential_repository/add_credentials_from_event.py b/monkey/infection_monkey/credential_repository/add_credentials_from_event.py index 123774581..77efc39ab 100644 --- a/monkey/infection_monkey/credential_repository/add_credentials_from_event.py +++ b/monkey/infection_monkey/credential_repository/add_credentials_from_event.py @@ -1,11 +1,16 @@ +import logging + from common.events import CredentialsStolenEvent from . import IPropagationCredentialsRepository +logger = logging.getLogger(__name__) + class add_credentials_from_event_to_propagation_credentials_repository: def __init__(self, credentials_repository: IPropagationCredentialsRepository): self._credentials_repository = credentials_repository def __call__(self, event: CredentialsStolenEvent): + logger.debug(f"Adding {len(event.stolen_credentials)} to the credentials repository") self._credentials_repository.add_credentials(event.stolen_credentials)