ENGINE: Migrated Logs to Runtime Folders

This commit is contained in:
2025-10-29 15:19:29 -06:00
parent 98737fb737
commit 8fa7bd4fb0
11 changed files with 36 additions and 33 deletions

View File

@@ -219,7 +219,7 @@ def _run_powershell_via_system_task(content: str, env_map: Dict[str, str], timeo
with os.fdopen(script_fd, 'w', encoding='utf-8', newline='\n') as f:
f.write(final_content)
try:
log_dir = os.path.join(_project_root(), 'Logs', 'Agent')
log_dir = os.path.join(_project_root(), 'Agent', 'Logs')
os.makedirs(log_dir, exist_ok=True)
with open(os.path.join(log_dir, 'system_last.ps1'), 'w', encoding='utf-8', newline='\n') as df:
df.write(content or '')