Bug 1415614 - Don't assign mach logger to instance variable; r=nalexander
We don't use this attribute outside of this function. Besides, you can
easily obtain a handle on the logger by calling
``logging.getLogger('mach')``.
MozReview-Commit-ID: 41vdn6McowW
--- a/python/mach/mach/logging.py
+++ b/python/mach/mach/logging.py
@@ -156,22 +156,22 @@ class LoggingManager(object):
self.root_logger = logging.getLogger()
self.root_logger.setLevel(logging.DEBUG)
# Installing NullHandler on the root logger ensures that *all* log
# messages have at least one handler. This prevents Python from
# complaining about "no handlers could be found for logger XXX."
self.root_logger.addHandler(logging.NullHandler())
- self.mach_logger = logging.getLogger('mach')
- self.mach_logger.setLevel(logging.DEBUG)
+ mach_logger = logging.getLogger('mach')
+ mach_logger.setLevel(logging.DEBUG)
self.structured_filter = ConvertToStructuredFilter()
- self.structured_loggers = [self.mach_logger]
+ self.structured_loggers = [mach_logger]
self._terminal = None
@property
def terminal(self):
if not self._terminal and blessings:
# Sometimes blessings fails to set up the terminal. In that case,
# silently fail.