Skip to content

Commit

Permalink
add default log location for snapshot (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
vbalbp authored Sep 26, 2024
1 parent ce3d6b7 commit 1eb18d2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dynatrace_extension/sdk/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ def find_log_dir() -> Path:
for line in f:
if line.startswith("LogDir"):
log_dir = line.split("=")[1].strip()
if not log_dir:
return Path(os.path.expandvars("%PROGRAMDATA%") + "/dynatrace/oneagent/log") if os.name == "nt" else Path("/var/log/dynatrace/oneagent")
return Path(log_dir)
msg = f"Could not find LogDir in {installation_conf}"
raise Exception(msg)

0 comments on commit 1eb18d2

Please sign in to comment.