Agent: Add debug logging to add_creds_from_event_to_prop_creds_repo()

This commit is contained in:
Mike Salvatore 2022-08-23 10:56:25 -04:00
parent 0b8355c8a4
commit 9ab2c0bc6a
1 changed files with 5 additions and 0 deletions

View File

@ -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)