Skip to content

Commit 3f70c9d

Browse files
Add documentation for log file path resolution behavior
Document that relative paths in logging_config.ini are automatically resolved against the application directory, not the process CWD. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cb25a18 commit 3f70c9d

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

docs/advanced/settings-reference.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,18 @@ By default, RushTI writes `rushti.log` to the application root directory (next t
9191

9292
See `config/logging_config.ini` for the full configuration.
9393

94+
#### Log File Path Resolution
95+
96+
Relative file paths in `logging_config.ini` (e.g., `'rushti.log'`) are automatically resolved against the **application directory** — not the current working directory. This means the log file is always created in the expected location, even when RushTI is invoked from a different directory (e.g., via TM1's `ExecuteCommand` where the working directory is typically `C:\windows\system32`).
97+
98+
The application directory is determined by:
99+
100+
1. `RUSHTI_DIR` environment variable (if set)
101+
2. The directory containing the executable (for standalone `.exe` builds)
102+
3. The project root (for pip-installed scripts)
103+
104+
If you specify an **absolute path** in `logging_config.ini` (e.g., `'E:/logs/rushti.log'`), it is used as-is.
105+
94106
!!! tip "Choosing a Log Level"
95107
- **DEBUG**: Full worker activity, task scheduling decisions, connection details. Use for troubleshooting.
96108
- **INFO**: Normal operations -- task starts/completions, run summary. Default for production.

docs/features/tm1-integration.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,9 @@ ExecuteCommand(cmd, 1);
315315
- **Always use `cmd /c`** — TM1's `ExecuteCommand` does not invoke a shell by default. Wrapping with `cmd /c` ensures the command runs in a proper shell environment.
316316
- **Use `ExecuteCommand(cmd, 1)`** — The second parameter `1` makes TM1 wait for RushTI to complete before continuing the TI process.
317317

318+
!!! note "Log File Location"
319+
When launched from `ExecuteCommand`, the process working directory is typically `C:\windows\system32`. RushTI automatically resolves relative log file paths (configured in `logging_config.ini`) against the application directory (`RUSHTI_DIR` or the exe directory), so `rushti.log` is created in the correct location regardless of the working directory. See [Logging](../advanced/settings-reference.md#logging) for details.
320+
318321
---
319322

320323
## Customize Further

0 commit comments

Comments
 (0)