Bug 1254313 - Log less when running mach run --debug within emacs. r?gps draft
authorAndreas Farre <afarre@mozilla.com>
Mon, 11 Apr 2016 11:20:52 -0400
changeset 349444 62248f663696388a02e207ddc6593945cb7c2ee4
parent 349443 962fe71a51611dd24e8a025d3a7e533c8a6c1953
child 518098 91cbc8a749ca637df4271995f3723eaaf2f96560
push id15086
push userbmo:afarre@mozilla.com
push dateMon, 11 Apr 2016 15:29:57 +0000
reviewersgps
bugs1254313
milestone48.0a1
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)