Bug 1254313 - Log less when running mach run --debug within emacs. r=gps
authorAndreas Farre <afarre@mozilla.com>
Mon, 11 Apr 2016 11:20:52 -0400
changeset 330528 1e038d4d718fa1b758147b7d9f32072fe9bfe1cd
parent 330527 bd4c7118ebb957763b7d957ca73b7fba6cf61265
child 330529 03afa06c12722ae0eb16797e26b1a3ec00cff3d0
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1254313
milestone48.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 1254313 - Log less when running mach run --debug within emacs. r=gps Check if the INSIDE_EMACS environment variable is set and change the log level to WARNING to not confuse the emacs/mi with logging messages. MozReview-Commit-ID: 5AWZ6swGJsE
python/mozbuild/mozbuild/mach_commands.py
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1168,16 +1168,19 @@ class RunProgram(MachCommandBase):
                 if not os.path.isdir(path):
                     os.makedirs(path)
                 args.append('-profile')
                 args.append(path)
 
         extra_env = {'MOZ_CRASHREPORTER_DISABLE': '1'}
 
         if debug or debugger or debugparams:
+            if 'INSIDE_EMACS' in os.environ:
+                self.log_manager.terminal_handler.setLevel(logging.WARNING)
+
             import mozdebug
             if not debugger:
                 # No debugger name was provided. Look for the default ones on
                 # current OS.
                 debugger = mozdebug.get_default_debugger_name(mozdebug.DebuggerSearch.KeepLooking)
 
             if debugger:
                 self.debuggerInfo = mozdebug.get_debugger_info(debugger, debugparams)