Skip to content

Commit

Permalink
fix: allow overriding logs folder via GPTME_LOGS_HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Jan 10, 2025
1 parent d33ff35 commit a34276c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gptme/dirs.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ def get_data_dir() -> Path:

def get_logs_dir() -> Path:
"""Get the path for **conversation logs** (not to be confused with the logger file)"""
path = get_data_dir() / "logs"
if "GPTME_LOGS_HOME" in os.environ:
path = Path(os.environ["GPTME_LOGS_HOME"])
else:
path = get_data_dir() / "logs"
path.mkdir(parents=True, exist_ok=True)
return path

Expand Down

0 comments on commit a34276c

Please sign in to comment.