Skip to content

Commit b1a15e9

Browse files
committed
feat: allow strings to specify path to log file
1 parent 03d1047 commit b1a15e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/readylog/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55

66

77
def create_dict_config(
8-
logfile: Path,
8+
logfile: Path | str,
99
app_name: str,
1010
console_log_level: str | int = "WARNING",
1111
file_log_level: str | int = "DEBUG",
1212
console_handler_factory: Callable = StreamHandler,
1313
file_handler_factory: Callable = FileHandler,
1414
) -> dict[str, str]:
15+
logfile = Path(logfile)
1516
console_log_level = _checkLevel(console_log_level)
1617
file_log_level = _checkLevel(file_log_level)
1718
min_level = getLevelName(min(console_log_level, file_log_level))

0 commit comments

Comments
 (0)