[#log-levels] = Logging - Application [NOTE] There are two different types of logs in OliveTin - xref:advanced_configuration/logs.adoc[application logs] and xref:logs/actions.adoc[action logs]. This page is about the __application logs__, which are the logs that OliveTin itself generates. The action logs are the logs that are generated by the actions that you run in OliveTin. OliveTin supports a few different log levels. The default logLevel is `INFO`. Before configuration is loaded, OliveTin also logs at `INFO` by default. Pass `-startuptrace` if you need `TRACE` messages while OliveTin is searching for and loading `config.yaml` (for example to see which config paths were checked). After configuration loads, `logLevel` from `config.yaml` takes over as usual. .`Example: enable startup TRACE logging` [source,bash] ---- OliveTin -startuptrace -configdir /etc/OliveTin ---- You can set a `logLevel` in config.yaml like this; .`config.yaml` [source,yaml] ---- logLevel: "INFO" actions: .... ---- The supported log levels are; * `TRACE` - Extremely detailed messages (for example config decode hooks). Usually only useful with `-startuptrace`. * `DEBUG` - Every possible log message will be shown. This will use a lot of disk space and is not recommended unless you are a developer / like reading code. * `ERROR` - OliveTin rarely uses the `ERROR` log level. * `WARN` - Very few messages, only warnings are shown. * `INFO` - The defualt log level. [#debug-logs-sensitive] [WARNING] ==== `DEBUG` and `TRACE` logs (including `-startuptrace` and xref:troubleshooting/log-debug-options.adoc[Debug Log Options]) are meant to show OliveTin's internal workings, so they **will contain sensitive information**: configuration values including secrets, API keys, password hashes, OAuth2 client secrets, webhook secrets, and request headers. This is expected, and is not considered a security vulnerability. Only use these log levels while troubleshooting, switch back to `INFO` afterwards, treat the logs as being as sensitive as your `config.yaml`, and remove secrets before sharing them with anyone. ==== You can change the `logLevel` while OliveTin is running, and it should update as soon as you save your config.yaml. You will always get a log message like this; [source,bash] ---- INFO Setting log level to warning ---- == JSON Log Format * OliveTin 2k supports JSON log format from version **2025.10.30**. * OliveTin 3k supports JSON log format from version **3000.2.2**. You can enable JSON log format by setting the `OLIVETIN_LOG_FORMAT` environment variable to `json`. [source,bash] .Example of setting `OLIVETIN_LOG_FORMAT` to `json`. ---- root@server: ./OliveTin {"commit":"nocommit","date":"nodate","level":"info","msg":"OliveTin initializing","time":"2025-10-30T10:09:55Z","version":"dev"} {"level":"info","msg":"Setting log level to info","time":"2025-10-30T10:09:55Z"} {"level":"info","msg":"OliveTin initialization complete","time":"2025-10-30T10:09:55Z"} {"configDir":"/home/xconspirisist/sandbox/Development/OliveTin/OliveTin","level":"info","msg":"OliveTin started","time":"2025-10-30T10:09:55Z"} ----