Logging
1. Introduction
The DSF BPE executes distributed workflows and provides three logging channels: Standard Logs,
a Data Logger for introspection purposes, and BPMN Debug Logs for process plugin developers.
Standard Logging
| Purpose | Property Key | Environment Variable | Default |
|---|---|---|---|
| External Log4j2 config | dev.dsf.log.config | DEV_DSF_LOG_CONFIG | conf/log4j2.xml |
| Enable stderr logging | dev.dsf.log.console.err.enabled | DEV_DSF_LOG_CONSOLE_ERR_ENABLED | false |
| Level for stderr | dev.dsf.log.console.err.level | DEV_DSF_LOG_CONSOLE_ERR_LEVEL | INFO |
| Style for stderr | dev.dsf.log.console.err.style | DEV_DSF_LOG_CONSOLE_ERR_STYLE | TEXT_COLOR |
| Enable stdout logging | dev.dsf.log.console.out.enabled | DEV_DSF_LOG_CONSOLE_OUT_ENABLED | true |
| Level for stdout | dev.dsf.log.console.out.level | DEV_DSF_LOG_CONSOLE_OUT_LEVEL | INFO |
| Style for stdout | dev.dsf.log.console.out.style | DEV_DSF_LOG_CONSOLE_OUT_STYLE | TEXT_COLOR |
| Enable file logging | dev.dsf.log.file.enabled | DEV_DSF_LOG_FILE_ENABLED | true |
| File log level | dev.dsf.log.file.level | DEV_DSF_LOG_FILE_LEVEL | DEBUG |
| File log style | dev.dsf.log.file.style | DEV_DSF_LOG_FILE_STYLE | TEXT_MDC |
Data Logger
| Purpose | Property Key | Environment Variable | Default |
|---|---|---|---|
| Enable data log file | dev.dsf.log.data.file.enabled | DEV_DSF_LOG_DATA_FILE_ENABLED | false |
| Data file style | dev.dsf.log.data.file.style | DEV_DSF_LOG_DATA_FILE_STYLE | TEXT |
| Enable data logs on stdout | dev.dsf.log.data.console.out.enabled | DEV_DSF_LOG_DATA_CONSOLE_OUT_ENABLED | false |
| Style for stdout | dev.dsf.log.data.console.out.style | DEV_DSF_LOG_DATA_CONSOLE_OUT_STYLE | TEXT |
| Enable data logs on stderr | dev.dsf.log.data.console.err.enabled | DEV_DSF_LOG_DATA_CONSOLE_ERR_ENABLED | false |
| Style for stderr | dev.dsf.log.data.console.err.style | DEV_DSF_LOG_DATA_CONSOLE_ERR_STYLE | TEXT |
BPMN Debug Logging
| Purpose | Property Key | Environment Variable | Default |
|---|---|---|---|
| Log current DSF user | dev.dsf.bpe.debug.log.message.currentUser | DEV_DSF_BPE_DEBUG_LOG_MESSAGE_CURRENTUSER | false |
| Log SQL statements | dev.dsf.bpe.debug.log.message.dbStatement | DEV_DSF_BPE_DEBUG_LOG_MESSAGE_DBSTATEMENT | false |
| Log activity start | dev.dsf.bpe.debug.log.message.onActivityStart | DEV_DSF_BPE_DEBUG_LOG_MESSAGE_ONACTIVITYSTART | false |
| Log activity end | dev.dsf.bpe.debug.log.message.onActivityEnd | DEV_DSF_BPE_DEBUG_LOG_MESSAGE_ONACTIVITYEND | false |
| Log all variables | dev.dsf.bpe.debug.log.message.variables | DEV_DSF_BPE_DEBUG_LOG_MESSAGE_VARIABLES | false |
| Log local variables only | dev.dsf.bpe.debug.log.message.variablesLocal | DEV_DSF_BPE_DEBUG_LOG_MESSAGE_VARIABLESLOCAL | false |
| Log webservice requests | dev.dsf.bpe.debug.log.message.webserviceRequest | DEV_DSF_BPE_DEBUG_LOG_MESSAGE_WEBSERVICEREQUEST | false |
Logging Styles
The DSF logging system supports multiple output styles that can be selected independently for each logging channel (console, file, audit, data).
Every logger exposes a *.style property and a corresponding environment variable.
Text-Based Logging Styles
TEXT
Plain, unformatted text output (default for console output, used before DSF 2).
Use when:
- You want minimal overhead and simple logging
- Logs are read directly on the system
Avoid when:
- A log aggregation system is used
TEXT_MDC
Plain text with MDC (Mapped Diagnostic Context) fields, such as:
- correlationId
- processInstanceId
- user
- requestId
Use when:
- You want to log production environments without aggregation systems
- You want to debug distributed workflows with correlation IDs
Avoid when:
- A log aggregation system is used
TEXT_COLOR and TEXT_COLOR_MDC
ANSI-colored text output for terminals.
Use when:
- You want to develop locally
- You want to view docker logs directly with
docker logscommand - You want a fast visual distinction between INFO/WARN/ERROR
Avoid when:
- A log aggregation system is used
- Consoles without ANSI escape code support are used
JSON-Based Logging Styles
We support the structured logging formats JSON_LOGSTASH, JSON_ECS(Elastic Common Schema), JSON_GELF(Graylog Extended Log Format), and JSON_GCP (Google Cloud Platform Logging). They all include Mapped Diagnostic Context information (e.g., process names, ids, ...) and should be used in combination with the log aggreation system of your choice.