service-logs.adoc 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. [#service-logs]
  2. = Service logs (OliveTin process troubleshooting)
  3. :experimental:
  4. **Service logs** are the lines OliveTin prints while it runs—startup messages, configuration load, errors, and action output. They are separate from xref:troubleshooting/browser-console-logs.adoc[browser console logs], which come from the WebUI in your browser.
  5. When something fails on the server (OliveTin will not start, actions error, API or auth problems), sharing **recent service log output** helps others see what the process reported. You do **not** need to be a Linux expert to copy logs from Docker, Podman, or `journalctl`.
  6. TIP: Before posting publicly, scan the log text for passwords, API tokens, cookies, or internal hostnames. Remove or replace those strings if needed. If you enable xref:troubleshooting/log-debug-options.adoc[extra debug logging], output can be more sensitive than usual.
  7. [#where-logs-go]
  8. == Where logs come from
  9. How you read logs depends on how OliveTin is installed:
  10. * **Container (Docker / Podman):** logs are what the container runtime captured from OliveTin’s standard output.
  11. * **systemd service:** logs are stored by the system journal for the `OliveTin` unit.
  12. * **Manual / binary** (for example `./OliveTin` in a terminal): messages print to that terminal—copy them from there, or redirect output to a file when testing.
  13. * **Windows (binary or service):** OliveTin writes process logs to a file under `%ProgramData%\OliveTin\logs\` by default. You can override this with xref:install/windows_service.adoc#windows-service-logs[`serviceLogs.directory`] in `config.yaml`.
  14. [#windows]
  15. == Windows (binary or service)
  16. By default, OliveTin on Windows writes process logs to:
  17. [source]
  18. ----
  19. %ProgramData%\OliveTin\logs\OliveTin-service-<timestamp>.log
  20. ----
  21. To use a custom directory (for portable installs), set in `config.yaml`:
  22. [source,yaml]
  23. ----
  24. serviceLogs:
  25. directory: C:\Path\To\Logs\
  26. ----
  27. See xref:install/windows_service.adoc#windows-service-logs[Windows service logs directory] for details. This setting is ignored on non-Windows platforms.
  28. [#manual-binary]
  29. == Manual or binary run
  30. If you start OliveTin directly in a terminal window, **scroll back** and copy the text from startup through the error, or run it again and capture output:
  31. [source,shell]
  32. ----
  33. ./OliveTin 2>&1 | tee olivetin-run.log
  34. ----
  35. That writes everything to `olivetin-run.log` while still showing it on screen. Stop OliveTin before sharing, then attach or paste the relevant part of the file.
  36. [#docker-and-podman]
  37. == Docker and Podman
  38. Use the **same container name** you chose when you created the container (examples below use `olivetin`; yours may differ).
  39. .Show recent log lines (last ~200 lines)
  40. [source,shell]
  41. ----
  42. docker logs --tail 200 olivetin
  43. ----
  44. With Podman, use the same pattern:
  45. [source,shell]
  46. ----
  47. podman logs --tail 200 olivetin
  48. ----
  49. If OliveTin **crashes on startup** or you need the **full story from a restart**, show logs **after** reproducing the problem—either capture enough lines, or use a time window.
  50. .Limit output to the last few minutes (adjust the time as needed)
  51. [source,shell]
  52. ----
  53. docker logs --since 10m olivetin
  54. ----
  55. To **watch** logs live while you trigger an issue in another window:
  56. [source,shell]
  57. ----
  58. docker logs -f olivetin
  59. ----
  60. Press kbd:[Ctrl+C] to stop following; that does not stop OliveTin.
  61. [#docker-compose]
  62. == Docker Compose
  63. From the directory that contains your `compose.yaml` (or `docker-compose.yml`):
  64. [source,shell]
  65. ----
  66. docker compose logs --tail 200 olivetin
  67. ----
  68. Use the **service name** from the compose file, not necessarily the container name. Add `-f` to follow logs live, same idea as above.
  69. [#systemd]
  70. == systemd (native Linux package)
  71. Show whether the service is running and recent status:
  72. [source,shell]
  73. ----
  74. systemctl status OliveTin
  75. ----
  76. Read the journal for the OliveTin unit (scroll with arrow keys, quit with kbd:[q]):
  77. [source,shell]
  78. ----
  79. journalctl -eu OliveTin
  80. ----
  81. For a **time-bounded** slice (for example after a restart or failed action):
  82. [source,shell]
  83. ----
  84. journalctl -eu OliveTin --since "30 minutes ago"
  85. ----
  86. [#what-to-capture]
  87. == What to capture
  88. . Reproduce the problem if you can (restart OliveTin, click the action, etc.), then collect logs **immediately after**.
  89. . Include lines from **startup** through the **error**—not only the last one line.
  90. . If the log is huge, prefer `--since` / `--tail` so the excerpt stays readable.
  91. . Note your **install type** (Docker, Podman, Compose, systemd) and OliveTin **version** if you know it (from the WebUI footer, xref:troubleshooting/server-diagnostics.adoc[server diagnostics], or startup text).
  92. For deeper server-side detail, you can temporarily enable xref:troubleshooting/log-debug-options.adoc[LogDebugOptions]—then capture logs again with those settings in mind.
  93. [#share-the-logs]
  94. == Share the logs
  95. Paste the text into a xref:troubleshooting/wheretofindhelp.adoc[Discord or GitHub support] message (or attach a `.txt` file if it is long). Together with **how you run OliveTin** (direct port, reverse proxy, container flags) and **what you did** before the error, service logs make backend issues much easier to diagnose than a screenshot of the WebUI alone.
  96. For WebUI-only behaviour (blank page, buttons not loading), also capture xref:troubleshooting/browser-console-logs.adoc[browser console logs] when relevant.