remove logging handler that shows logging messages to stdout - issue #297

This commit is contained in:
Bernardo Damele 2013-01-10 00:51:56 +00:00
parent ccc3c3d1a3
commit 10f1099944

View File

@ -1819,7 +1819,7 @@ class LogRecorder(logging.StreamHandler):
Simply record the emitted events.
"""
self.loghist.append({'levelname': record.levelname,
'text': record.message % record.args if record.args else record.message,
'text': record.msg % record.args if record.args else record.msg,
'id': len(self.loghist)+1})
if conf.fdLog:
@ -1827,7 +1827,7 @@ class LogRecorder(logging.StreamHandler):
def _setRestAPILog():
if hasattr(conf, "fdLog") and conf.fdLog:
#logger.removeHandler(LOGGER_HANDLER)
logger.removeHandler(LOGGER_HANDLER)
LOGGER_RECORDER = LogRecorder()
logger.addHandler(LOGGER_RECORDER)