windows_service_logs.adoc 1.5 KB

123456789101112131415161718192021222324252627
  1. [#windows-service-logs]
  2. == Process log directory
  3. On Windows, OliveTin writes its **process logs** (startup messages, configuration load, errors, and internal diagnostics) to a log file on disk. By default these files are stored under `%ProgramData%\OliveTin\logs\` as `OliveTin-service-<timestamp>.log`.
  4. This is separate from xref:logs/saving.adoc[action execution logs] (`saveLogs`), which persist command output from individual actions.
  5. Portable or self-contained installs often keep OliveTin, its configuration, and its logs together in one folder. Without a custom path, process logs always go to `%ProgramData%`, even when you run OliveTin from another location.
  6. Add a `serviceLogs` block to your `config.yaml`:
  7. [source,yaml]
  8. ----
  9. serviceLogs:
  10. directory: ./logs/service/
  11. ----
  12. OliveTin creates the directory if it does not exist and writes a new timestamped log file there on each startup.
  13. If `serviceLogs.directory` is omitted, OliveTin uses the default location: `%ProgramData%\OliveTin\logs\`.
  14. Relative paths (for example `./logs/service/`) are resolved from the directory containing `OliveTin.exe`. This keeps portable installs self-contained when you colocate logs with the application.
  15. [NOTE]
  16. ====
  17. `serviceLogs.directory` is **Windows only**. If you set it on Linux, macOS, or in a container, OliveTin logs an error at startup and ignores the setting. On those platforms, use xref:troubleshooting/service-logs.adoc[service logs troubleshooting] for how to read process output (for example `journalctl` or container logs).
  18. ====