We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 512d89c + 75da7e2 commit 43d5983Copy full SHA for 43d5983
src/legenddataflowscripts/utils/log.py
@@ -39,11 +39,14 @@ def build_log(
39
log_file
40
The path to the log file.
41
"""
42
- if isinstance(config_dict, str):
+ if isinstance(config_dict, str | dict):
43
config_dict = {"options": {"logging": config_dict}}
44
+
45
if "logging" in config_dict["options"]:
46
log_config = config_dict["options"]["logging"]
- log_config = Props.read_from(log_config)
47
+ # if it's a str, interpret it as a path to a file
48
+ if isinstance(log_config, str):
49
+ log_config = Props.read_from(log_config)
50
51
if log_file is not None:
52
Path(log_file).parent.mkdir(parents=True, exist_ok=True)
0 commit comments