add debug outpout
This commit is contained in:
parent
5d17b31750
commit
c57cc49add
@ -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] "
|
||||
|
||||
|
@ -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))
|
||||
|
Reference in New Issue
Block a user