Skip to main content

Logging Configuration

Configuration via Environment Variables​

The following environment variables are available to configure the application's logging:

NameValuesDescriptionDefault
LOG_LEVELERROR, WARN, INFO, HTTP, VERBOSE, DEBUG, SILLYSets the logging level of the application at startupINFO
LOG_FORMAT_STDOUTOFF, FLAT, JSONSets the log format in the consoleFLAT
LOG_FORMAT_FILEOFF, FLAT, JSONSets the log format of the log filesFLAT
LOG_ATTACHED_FILE_EXCERPTNONE, PARTIAL, FULLLogs uploaded text files when a request fails or returns validation errorsNONE

If the environment variable LOG_FORMAT_FILE is set to OFF, no log files will be written.

LOG_ATTACHED_FILE_EXCERPT controls how much of each uploaded text file (e.g. CSV, JSON, YAML, TXT) is logged:

  • NONE: nothing is logged. This also applies when the variable is missing or has an unknown value.
  • PARTIAL: the first 3 lines, each trimmed to 1000 characters. Cut content is marked with ....
  • FULL: the complete file.

Binary files such as PDFs are never logged. Uploaded files may contain personal data, so enable this only temporarily for troubleshooting.

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: */*'

The attached file log mode (LOG_ATTACHED_FILE_EXCERPT) can be read with GET /api/logs/attached-file-excerpt and changed at runtime with PUT /api/logs/attached-file-excerpt. This change is not persistent either: after a restart, the value of LOG_ATTACHED_FILE_EXCERPT applies again (or NONE if it is not set). Each change is logged with the user who made it. An example request to log uploaded files partially looks as follows:

curl -X 'PUT' \
'https://localhost:3333/api/logs/attached-file-excerpt?mode=partial' \
-H 'accept: */*'

There is no REST endpoint for the log format, as it can only be configured at application startup.