_("change output verbose level (default is 3)."))
parser.add_option('b', 'batch', 'boolean', "batch",
_("batch mode (no question)."))
+parser.add_option('t', 'all_in_terminal', 'boolean', "all_in_terminal",
+ _("All traces in the terminal (for example compilation logs)."))
class Sat(object):
'''The main class that stores all the commands of salomeTools
# create log file, unless the command is called
# with a logger as parameter
logger_command = src.logger.Logger(self.cfg,
- silent_sysstd=silent)
+ silent_sysstd=silent,
+ all_in_terminal=options.all_in_terminal)
if logger:
logger_command = logger
class Logger(object):
'''Class to handle log mechanism.
'''
- def __init__(self, config, silent_sysstd=False):
+ def __init__(self, config, silent_sysstd=False, all_in_terminal=False):
'''Initialization
:param config pyconf.Config: The global configuration.
self.put_initial_xml_fields()
# Initialize the txt file for reading
self.logTxtFile = open(str(self.txtFilePath), 'w')
+ if all_in_terminal:
+ self.logTxtFile = sys.__stdout__
def put_initial_xml_fields(self):
'''Method called at class initialization : Put all fields