diff --git a/tests/benchmark/milvus_benchmark/logs/log.py b/tests/benchmark/milvus_benchmark/logs/log.py index df84461c70..865e9a812a 100644 --- a/tests/benchmark/milvus_benchmark/logs/log.py +++ b/tests/benchmark/milvus_benchmark/logs/log.py @@ -13,11 +13,18 @@ def setup_logging(config_path=LOG_CONFIG_PATH, default_level=logging.INFO): """ Setup logging configuration """ - print(FILE_NAME) + print(global_params.log_file_path) try: with open(config_path, 'rt') as f: log_config = yaml.safe_load(f.read()) - log_config["handlers"]["info_file_handler"].update({"filename": FILE_NAME}) + log_config["handlers"]["info_file_handler"].update({"filename": global_params.log_file_path}) logging.config.dictConfig(log_config) except Exception: raise logging.error('Failed to open file', exc_info=True) + + +class GlobalParams: + log_file_path = FILE_NAME + + +global_params = GlobalParams()