- logging_formater = '%(asctime)s - %(name)s - %(threadName)s - %(levelname)s - %(message)s'
- logging.basicConfig(filename=configuration.script_executor_property('logFile'),
- level=logging.DEBUG,
+ log_file_name = configuration.script_executor_property('logFile')
+ log_file = os.path.join(os.path.dirname(os.path.abspath(os.path.dirname(__file__))), "logging.yaml")
+ print(log_file)
+ with open(log_file) as log:
+ log_config = yaml.safe_load(log)
+ print(log_config)
+ logging_formater = log_config["formatters"]["default"]["format"]
+ print(log_config["loglevel"])
+ if log_config["loglevel"] == "debug":
+ loglevel = logging.DEBUG
+ elif log_config["loglevel"] == "info":
+ loglevel = logging.INFO
+ elif log_config["loglevel"] == "error":
+ loglevel = logging.ERROR
+ logging.basicConfig(filename=log_file_name,
+ level=loglevel,