Skip to content

Commit 2d9c273

Browse files
Allow default log directory location to be overridden with LOG_DIR environment variable.
1 parent b40ab4b commit 2d9c273

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/seclab_taskflow_agent/path_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ def log_dir() -> str:
3939
Returns:
4040
str: The path to the log directory.
4141
"""
42+
p = os.getenv("LOG_DIR")
43+
if p:
44+
return Path(p)
4245
return platformdirs.user_log_dir(appname="seclab-taskflow-agent",
4346
appauthor="GitHubSecurityLab",
4447
ensure_exists=True)

0 commit comments

Comments
 (0)