savelogs.adoc 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. [#save-logs]
  2. = Saving logs
  3. By default, OliveTin only keeps logs in memory, meaning that if you restart OliveTin your logs will be lost. For some use cases this is acceptable, but you can configure OliveTin to save logs for you.
  4. You can configure the global setting for saving logs, or override it on a per-action basis;
  5. [source,yaml]
  6. .`config.yaml`
  7. ----
  8. saveLogs:
  9. resultsDirectory: /var/log/OliveTin/results/
  10. outputDirectory: /var/log/OliveTin/output/
  11. actions:
  12. # This will use the default `saveLogs` setting.
  13. - title: date
  14. shell: date
  15. # This will override the default `saveLogs` setting.
  16. - title: date2
  17. shell: date
  18. saveLogs:
  19. resultsDirectory: /logs/
  20. outputDirectory: /logs/
  21. ----
  22. From the above example, you can see there There are two types of logs - **results (.yaml)** and **output (.log)**
  23. * **Results (.yaml)** - this captures almost everything that OliveTin knows about the action and looks like this.
  24. +
  25. [source,yaml]
  26. .Example results - date.1714333384.5e2dc9e5-b6b3-445b-bff9-c2082b0bbbb2.yaml
  27. ----
  28. datetimestarted: 2024-04-28T20:43:04.426754136+01:00
  29. datetimefinished: 2024-04-28T20:43:04.436596926+01:00
  30. stdout: |
  31. Sun 28 Apr 20:43:04 BST 2024
  32. stderr: ""
  33. timedout: false
  34. blocked: false
  35. exitcode: 0
  36. tags: []
  37. executionstarted: true
  38. executionfinished: true
  39. executiontrackingid: 5e2dc9e5-b6b3-445b-bff9-c2082b0bbbb2
  40. process:
  41. pid: 4168638
  42. actiontitle: date
  43. actionicon: '😀'
  44. actionid: d3cf6e25-8bab-432d-b4f9-e6f531b2b67b
  45. ----
  46. * **output (.log)** - this just captures the output - stdout, stderr from an execution,
  47. +
  48. [source]
  49. .Example output - date.1714333384.5e2dc9e5-b6b3-445b-bff9-c2082b0bbbb2.log
  50. ----
  51. Sun 28 Apr 20:43:04 BST 2024
  52. ----