зеркало из https://github.com/mozilla/gecko-dev.git
Bug 818649 - Ensure mach logs are written to log file; r=jhammel
DONTBUILD (NPOTB)
This commit is contained in:
Родитель
cc536f5aa8
Коммит
b90f244f8b
|
@ -112,11 +112,10 @@ class StructuredTerminalFormatter(StructuredHumanFormatter):
|
|||
class LoggingManager(object):
|
||||
"""Holds and controls global logging state.
|
||||
|
||||
A mozbuild application should instantiate one of these and configure it
|
||||
as needed.
|
||||
An application should instantiate one of these and configure it as needed.
|
||||
|
||||
This class provides a mechanism to configure the output of logging data
|
||||
both from mozbuild and from the overall logging system (e.g. from other
|
||||
both from mach and from the overall logging system (e.g. from other
|
||||
modules).
|
||||
"""
|
||||
|
||||
|
@ -135,12 +134,12 @@ class LoggingManager(object):
|
|||
# complaining about "no handlers could be found for logger XXX."
|
||||
self.root_logger.addHandler(logging.NullHandler())
|
||||
|
||||
self.mozbuild_logger = logging.getLogger('mozbuild')
|
||||
self.mozbuild_logger.setLevel(logging.DEBUG)
|
||||
self.mach_logger = logging.getLogger('mach')
|
||||
self.mach_logger.setLevel(logging.DEBUG)
|
||||
|
||||
self.structured_filter = ConvertToStructuredFilter()
|
||||
|
||||
self.structured_loggers = [self.mozbuild_logger]
|
||||
self.structured_loggers = [self.mach_logger]
|
||||
|
||||
self._terminal = None
|
||||
|
||||
|
@ -227,6 +226,6 @@ class LoggingManager(object):
|
|||
"""Register a structured logger.
|
||||
|
||||
This needs to be called for all structured loggers that don't chain up
|
||||
to the mozbuild logger in order for their output to be captured.
|
||||
to the mach logger in order for their output to be captured.
|
||||
"""
|
||||
self.structured_loggers.append(logger)
|
||||
|
|
Загрузка…
Ссылка в новой задаче