From 89666aa3681a001129554e55be536b77ffe485af Mon Sep 17 00:00:00 2001 From: Matthew Letter Date: Wed, 27 Jun 2018 10:55:38 -0600 Subject: [PATCH] corrected string log names --- agent/agent.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/agent/agent.py b/agent/agent.py index 65fe9010c..02e81f8b4 100644 --- a/agent/agent.py +++ b/agent/agent.py @@ -193,15 +193,15 @@ def get_job_logger(self, name): :param jid: job id :return: """ - logger = logging.getLogger(name) - if name not in self._loggers: + logger = logging.getLogger(str(name)) + if str(name) not in self._loggers: logger.setLevel(logging.INFO) handler = logging.FileHandler(str(name) + '.log') formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s') handler.setFormatter(formatter) logger.addHandler(handler) - self._loggers[name] = logger - return lambda msg: self._loggers[name].info(msg) + self._loggers[str(name)] = logger + return lambda msg: self._loggers[str(name)].info(msg) def get_user_config(self): """