From 4647e8b51b821d5de4aa9a42fed865836e6f25ce Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Thu, 12 Dec 2024 14:28:01 -0500 Subject: [PATCH] fix path --- src/therapy/log.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/therapy/log.py b/src/therapy/log.py index 662650d6..6b0a634f 100644 --- a/src/therapy/log.py +++ b/src/therapy/log.py @@ -1,7 +1,6 @@ """Provide functions and utilities related to application logging.""" import logging -from pathlib import Path def _quiet_upstream_libs() -> None: @@ -15,7 +14,7 @@ def _quiet_upstream_libs() -> None: def configure_logs( - log_file: Path | None = None, + log_file: str | None = None, log_level: int = logging.DEBUG, quiet_upstream: bool = True, ) -> None: @@ -26,11 +25,11 @@ def configure_logs( :param quiet_upstream: if True, turn off debug logging for a selection of libraries """ if log_file is None: - log_file = Path("therapy.log") + log_file = "therapy.log" if quiet_upstream: _quiet_upstream_libs() logging.basicConfig( - filename=log_file.absolute().as_uri(), + filename=log_file, format="[%(asctime)s] - %(name)s - %(levelname)s : %(message)s", ) logger = logging.getLogger(__package__)