Logging Configuration
Configuration via Environment Variables
The following environment variables are available to configure the application's logging:
| Name | Values | Description | Default |
|---|---|---|---|
| LOG_LEVEL | ERROR, WARN, INFO, HTTP, VERBOSE, DEBUG, SILLY | Sets the logging level of the application at startup | INFO |
| LOG_FORMAT_STDOUT | OFF, FLAT, JSON | Sets the log format in the console | FLAT |
| LOG_FORMAT_FILE | OFF, FLAT, JSON | Sets the log format of the log files | FLAT |
If the environment variable LOG_FORMAT_FILE is set to OFF, no log files will be written.
Configuration via REST API
The log level can also be changed at runtime via the REST API, using the endpoint PUT /api/logs/level.
This change is not persistent and will be reset when the application is restarted.
An example request to set the log level to debug looks as follows:
curl -X 'PUT' \s
'https//localhost:3333/api/logs/level?level=debug' \
-H 'accept: */*'
There is no REST endpoint for the log format, as it can only be configured at application startup.