diff --git a/src/aare/common/logger_config.py b/src/aare/common/logger_config.py index 516c7f05..e93138d1 100644 --- a/src/aare/common/logger_config.py +++ b/src/aare/common/logger_config.py @@ -38,13 +38,13 @@ def setup_logger(name="aareDAQ", base_dir: str | None = '~/tmp/mxlogs', config_p # switch to production mode using: $ APP_ENV=prod python main.py env = os.getenv("APP_ENV", "dev") # default: dev - #if config_path is None: - # config_file = get_config_path(env) - #else: - # config_file = Path(config_path) + if config_path is None: + config_file = get_config_path(env) + else: + config_file = Path(config_path) - # with open(config_file, "r") as f: - # config = yaml.safe_load(f.read()) + with open(config_file, "r") as f: + config = yaml.safe_load(f.read()) # Force base directory to be under the user's home dir # effective_base = base_dir or '~/mxlogs' @@ -65,7 +65,7 @@ def setup_logger(name="aareDAQ", base_dir: str | None = '~/tmp/mxlogs', config_p #if log_dir and not os.path.exists(log_dir): # os.makedirs(log_dir, exist_ok=True) -# logging.config.dictConfig(config) + logging.config.dictConfig(config) logging.getLogger("redis_lock").setLevel(logging.WARNING) logging.getLogger("urllib3").setLevel(logging.WARNING) logging.getLogger("matplotlib.font_manager").setLevel(logging.WARNING)