From 61bd70a6c9d179c76e66592804ae951fa05f9807 Mon Sep 17 00:00:00 2001 From: Chris McCarthy Date: Thu, 8 Jun 2023 08:49:06 +0100 Subject: [PATCH] #915 - Ensured LOG_DIR is created so primaite package can be used to perform setup while still logging using primaite logs. --- src/primaite/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/primaite/__init__.py b/src/primaite/__init__.py index 3c38a53b..4022f9b4 100644 --- a/src/primaite/__init__.py +++ b/src/primaite/__init__.py @@ -52,6 +52,8 @@ def _log_dir() -> Path: LOG_DIR: Final[Path] = _log_dir() """The path to the app log directory as an instance of `Path` or `PosixPath`, depending on the OS.""" +LOG_DIR.mkdir(exist_ok=True, parents=True) + LOG_PATH: Final[Path] = LOG_DIR / "primaite.log" """The primaite.log file path as an instance of `Path` or `PosixPath`, depending on the OS."""