add debug outpout

This commit is contained in:
Robert Kaussow 2019-12-19 12:51:52 +01:00
parent 5d17b31750
commit c57cc49add
2 changed files with 1 additions and 1 deletions

View File

@ -86,6 +86,7 @@ class AgentCleanup:
dry = self.config["dry_run"]
dryrun_msg = ""
self.logger.debug("Pending object dump: {}".format(pending))
if dry:
dryrun_msg = "[DRYRUN] "

View File

@ -66,7 +66,6 @@ class MultilineJsonFormatter(jsonlogger.JsonFormatter):
class Log:
def __init__(self, level=logging.WARN, name="cleanupagents", logfile="/var/log/drone-agents.log", json=False):
self.logger = logging.getLogger(name)
self.logger.handlers.clear()
self.logger.setLevel(level)
self.logger.addHandler(self._get_error_handler(json=json))
self.logger.addHandler(self._get_warn_handler(json=json))