Bug 818649 - Ensure mach logs are written to log file; r=jhammel
authorGregory Szorc <gps@mozilla.com>
Fri, 07 Dec 2012 11:44:11 -0800
changeset 120869 47713070c007767345f95bb3438c84dbf9da28b2
parent 120868 e83769592c610fdae7744bd4cea92b386c90de82
child 120870 cf9284647b0bef160db8154932f8d741ccbf806d
push idunknown
push userunknown
push dateunknown
reviewersjhammel
bugs818649
milestone20.0a1
Bug 818649 - Ensure mach logs are written to log file; r=jhammel DONTBUILD (NPOTB)
python/mach/mach/logging.py
--- a/python/mach/mach/logging.py
+++ b/python/mach/mach/logging.py
@@ -107,21 +107,20 @@ class StructuredTerminalFormatter(Struct
             result = self.terminal.red(s[0:20]) + s[21:]
 
         return result
 
 
 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).
     """
 
     def __init__(self):
         self.start_time = time.time()
 
         self.json_handlers = []
         self.terminal_handler = None
@@ -130,22 +129,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.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
 
     @property
     def terminal(self):
         if not self._terminal and blessings:
             terminal = blessings.Terminal(stream=sys.stdout)
 
@@ -222,11 +221,11 @@ class LoggingManager(object):
         if self.terminal_handler:
             self.terminal_handler.removeFilter(self.structured_filter)
             self.root_logger.removeHandler(self.terminal_handler)
 
     def register_structured_logger(self, logger):
         """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)