Make sure we always have a good path.

The path wasn't right when running tests, because our working directory wasn't /spiffworkflow-backend
This commit is contained in:
mike cullerton 2022-09-22 16:27:44 -04:00
parent a328846a8b
commit 77259f07f5
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ def setup_logger(app: Flask) -> None:
spiff_logger_filehandler = None
if app.config["SPIFFWORKFLOW_BACKEND_LOG_TO_FILE"]:
spiff_logger_filehandler = logging.FileHandler(f"log/{app.env}.log")
spiff_logger_filehandler = logging.FileHandler(f"{app.root_path}/../../log/{app.env}.log")
spiff_logger_filehandler.setLevel(spiff_log_level)
spiff_logger_filehandler.setFormatter(log_formatter)