Added a --simple-output option
This option turns off fancy output options like colors or progress bars. Address #649
This commit is contained in:
@@ -254,7 +254,7 @@ class ANSIColorFormatter(HighlightingFormatter):
|
||||
# No coloring if it's not to be highlighted or colored
|
||||
return logging.Formatter.format(self, record)
|
||||
|
||||
def configure(loglevel=logging.INFO, verbose=False):
|
||||
def configure(loglevel=logging.INFO, verbose=False, simple=False):
|
||||
"""Configures the root logger to our liking
|
||||
|
||||
For a non-standard loglevel, pass in the level with which to configure the handler.
|
||||
@@ -268,8 +268,10 @@ def configure(loglevel=logging.INFO, verbose=False):
|
||||
logger = logging.getLogger()
|
||||
|
||||
outstream = sys.stdout
|
||||
if simple:
|
||||
formatter = DumbFormatter(verbose)
|
||||
|
||||
if platform.system() == 'Windows':
|
||||
elif platform.system() == 'Windows':
|
||||
# Our custom output stream processor knows how to deal with select ANSI
|
||||
# color escape sequences
|
||||
outstream = WindowsOutputStream(outstream)
|
||||
|
||||
Reference in New Issue
Block a user