Skip to content

Commit

Permalink
corrected string log names
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Letter committed Jun 27, 2018
1 parent 9b83ac7 commit 89666aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down

0 comments on commit 89666aa

Please sign in to comment.