Bug 1290620 - Make `mach taskgraph` honor mach logging settings; r=dustin
authorGregory Szorc <gps@mozilla.com>
Fri, 29 Jul 2016 20:37:42 -0700
changeset 348841 392d902c517d4078b8b4a92bf562366a06bcea96
parent 348840 4c2020735c691fb5bccba2439053da71d6355776
child 348842 9b080fde55c442af41360afa7f10defd9f1b9ab1
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1290620
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1290620 - Make `mach taskgraph` honor mach logging settings; r=dustin Before, it ignored mach logging settings passed via command line arguments. MozReview-Commit-ID: CNckQHrOdX9
taskcluster/mach_commands.py
--- a/taskcluster/mach_commands.py
+++ b/taskcluster/mach_commands.py
@@ -179,22 +179,25 @@ class MachCommands(MachCommandBase):
 
     def setup_logging(self, quiet=False, verbose=True):
         """
         Set up Python logging for all loggers, sending results to stderr (so
         that command output can be redirected easily) and adding the typical
         mach timestamp.
         """
         # remove the old terminal handler
-        self.log_manager.replace_terminal_handler(None)
+        old = self.log_manager.replace_terminal_handler(None)
 
         # re-add it, with level and fh set appropriately
         if not quiet:
             level = logging.DEBUG if verbose else logging.INFO
-            self.log_manager.add_terminal_logging(fh=sys.stderr, level=level)
+            self.log_manager.add_terminal_logging(
+                fh=sys.stderr, level=level,
+                write_interval=old.formatter.write_interval,
+                write_times=old.formatter.write_times)
 
         # all of the taskgraph logging is unstructured logging
         self.log_manager.enable_unstructured()
 
     def show_taskgraph(self, graph_attr, options):
         import taskgraph.parameters
         import taskgraph.target_tasks
         import taskgraph.generator