diff --git a/monkey/monkey_island/cc/models/monkey.py b/monkey/monkey_island/cc/models/monkey.py index 9a1559e3b..c049a63ee 100644 --- a/monkey/monkey_island/cc/models/monkey.py +++ b/monkey/monkey_island/cc/models/monkey.py @@ -2,6 +2,7 @@ Define a Document Schema for the Monkey document. """ import mongoengine +import logging from mongoengine import Document, StringField, ListField, BooleanField, EmbeddedDocumentField, ReferenceField, \ DateTimeField @@ -9,6 +10,8 @@ from monkey_island.cc.models.monkey_ttl import MonkeyTtl, create_monkey_ttl_docu from monkey_island.cc.consts import DEFAULT_MONKEY_TTL_EXPIRY_DURATION_IN_SECONDS +logger = logging.getLogger(__name__) + class Monkey(Document): """ This class has 2 main section: @@ -79,6 +82,7 @@ class Monkey(Document): return os def renew_ttl(self, duration=DEFAULT_MONKEY_TTL_EXPIRY_DURATION_IN_SECONDS): + logger.debug("Renewing TTL for monkey {0}".format(self.guid)) self.ttl_ref = create_monkey_ttl_document(duration)