зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 53b54cd44410 (bug 1026181) for lots of bustage causing a CLOSED TREE
This commit is contained in:
Родитель
638c326719
Коммит
7d39d62d88
|
@ -62,7 +62,7 @@ def add_logging_group(parser):
|
||||||
help=help_str)
|
help=help_str)
|
||||||
|
|
||||||
|
|
||||||
def setup_logging(suite, args, defaults=None):
|
def setup_logging(suite, args, defaults):
|
||||||
"""
|
"""
|
||||||
Configure a structuredlogger based on command line arguments.
|
Configure a structuredlogger based on command line arguments.
|
||||||
|
|
||||||
|
@ -73,10 +73,7 @@ def setup_logging(suite, args, defaults=None):
|
||||||
:param args: A dictionary of {argument_name:value} produced from
|
:param args: A dictionary of {argument_name:value} produced from
|
||||||
parsing the command line arguments for the application
|
parsing the command line arguments for the application
|
||||||
:param defaults: A dictionary of {formatter name: output stream} to apply
|
:param defaults: A dictionary of {formatter name: output stream} to apply
|
||||||
when there is no logging supplied on the command line. If
|
when there is no logging supplied on the command line.
|
||||||
this isn't supplied, reasonable defaults are chosen
|
|
||||||
(coloured mach formatting if stdout is a terminal, or raw
|
|
||||||
logs otherwise).
|
|
||||||
|
|
||||||
:rtype: StructuredLogger
|
:rtype: StructuredLogger
|
||||||
"""
|
"""
|
||||||
|
@ -86,13 +83,6 @@ def setup_logging(suite, args, defaults=None):
|
||||||
found_stdout_logger = False
|
found_stdout_logger = False
|
||||||
if not hasattr(args, 'iteritems'):
|
if not hasattr(args, 'iteritems'):
|
||||||
args = vars(args)
|
args = vars(args)
|
||||||
|
|
||||||
if defaults is None:
|
|
||||||
if sys.__stdout__.isatty():
|
|
||||||
defaults = {"mach_terminal": sys.stdout}
|
|
||||||
else:
|
|
||||||
defaults = {"raw": sys.stdout}
|
|
||||||
|
|
||||||
for name, values in args.iteritems():
|
for name, values in args.iteritems():
|
||||||
if name.startswith(prefix) and values is not None:
|
if name.startswith(prefix) and values is not None:
|
||||||
for value in values:
|
for value in values:
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import blessings
|
|
||||||
|
|
||||||
import base
|
import base
|
||||||
|
|
||||||
|
|
||||||
|
@ -136,8 +134,6 @@ class MachTerminalFormatter(BaseMachFormatter):
|
||||||
"""
|
"""
|
||||||
def __init__(self, start_time=None, write_interval=False, write_times=True,
|
def __init__(self, start_time=None, write_interval=False, write_times=True,
|
||||||
terminal=None):
|
terminal=None):
|
||||||
if terminal is None:
|
|
||||||
terminal = blessings.Terminal()
|
|
||||||
self.terminal = terminal
|
self.terminal = terminal
|
||||||
BaseMachFormatter.__init__(self,
|
BaseMachFormatter.__init__(self,
|
||||||
start_time=start_time,
|
start_time=start_time,
|
||||||
|
|
|
@ -17,7 +17,6 @@ setup(name=PACKAGE_NAME,
|
||||||
license='MPL 1.1/GPL 2.0/LGPL 2.1',
|
license='MPL 1.1/GPL 2.0/LGPL 2.1',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
install_requires=["blessings>=1.3"],
|
|
||||||
tests_require=['mozfile'],
|
tests_require=['mozfile'],
|
||||||
platforms =['Any'],
|
platforms =['Any'],
|
||||||
classifiers=['Development Status :: 4 - Beta',
|
classifiers=['Development Status :: 4 - Beta',
|
||||||
|
|
Загрузка…
Ссылка в новой задаче