feat: add UIPATH_LOG_TO_FILE env var for file logging without job context by smflorentino · Pull Request #103 · UiPath/uipath-runtime-python

@smflorentino @claude

…text

Adds a `log_to_file` flag that enables file-based logging (`__uipath/execution.log`)
without requiring `UIPATH_JOB_KEY` to be set. This allows developers to reproduce
and debug file-logging issues locally without triggering job-related side effects
(licensing headers, output.json writes, state file preservation).

Set `UIPATH_LOG_TO_FILE=true` to enable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

smflorentino added a commit to UiPath/uipath-python that referenced this pull request

Mar 26, 2026
When `log_to_file` is enabled (via `UIPATH_LOG_TO_FILE=true`), also register
the `LiveTrackingSpanProcessor` for span tracing. This ensures the file logging
repro path matches deployed behavior where span upserts run in background threads
alongside the main execution.

Companion PR: UiPath/uipath-runtime-python#103

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@smflorentino

robert-ursu

radu-mocanu