Bug 1044206 - Revert the global logger in mochitest's runtests to use python stdlib logging for compatibility with mozharness regex.;r=ahal

This commit is contained in:
Chris Manchester 2014-07-30 09:55:45 -04:00
Родитель aa8e34c9db
Коммит 757d8862c6
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -208,11 +208,6 @@ class MessageLogger(object):
self.buffering = False self.buffering = False
self.logger.suite_end() self.logger.suite_end()
# Global logger
log = StructuredLogger('mochitest')
stream_handler = StreamHandler(stream=sys.stdout, formatter=MochitestFormatter())
log.add_handler(stream_handler)
#################### ####################
# PROCESS HANDLING # # PROCESS HANDLING #
#################### ####################
@ -994,8 +989,13 @@ class Mochitest(MochitestUtilsMixin):
def __init__(self): def __init__(self):
super(Mochitest, self).__init__() super(Mochitest, self).__init__()
# Structured logger
structured_log = StructuredLogger('mochitest')
stream_handler = StreamHandler(stream=sys.stdout, formatter=MochitestFormatter())
structured_log.add_handler(stream_handler)
# Structured logs parser # Structured logs parser
self.message_logger = MessageLogger(logger=log) self.message_logger = MessageLogger(logger=structured_log)
# environment function for browserEnv # environment function for browserEnv
self.environment = environment self.environment = environment