silent = (self.cfg.USER.output_verbose_level == 0)
# create log file
+ micro_command = False
+ if logger_add_link:
+ micro_command = True
logger_command = src.logger.Logger(self.cfg,
silent_sysstd=silent,
- all_in_terminal=self.options.all_in_terminal)
+ all_in_terminal=self.options.all_in_terminal,
+ micro_command=micro_command)
# Check that the path given by the logs_paths_in_file option
# is a file path that can be written
class Logger(object):
'''Class to handle log mechanism.
'''
- def __init__(self, config, silent_sysstd=False, all_in_terminal=False):
+ def __init__(self,
+ config,
+ silent_sysstd=False,
+ all_in_terminal=False,
+ micro_command = False):
'''Initialization
:param config pyconf.Config: The global configuration.
self.silentSysStd = silent_sysstd
# Construct xml log file location for sat prints.
- logFileName = config.VARS.datehour + "_" + config.VARS.command + ".xml"
+ prefix = ""
+ if micro_command:
+ prefix = "micro_"
+ hour_command = config.VARS.datehour + "_" + config.VARS.command
+ logFileName = prefix + hour_command + ".xml"
logFilePath = os.path.join(config.USER.log_dir, logFileName)
# Construct txt file location in order to log
# the external commands calls (cmake, make, git clone, etc...)
- txtFileName = config.VARS.datehour + "_" + config.VARS.command + ".txt"
+ txtFileName = prefix + hour_command + ".txt"
txtFilePath = os.path.join(config.USER.log_dir, "OUT", txtFileName)
src.ensure_path_exists(os.path.dirname(logFilePath))