|
| 1 | +--- |
| 2 | +title: Logging |
| 3 | +icon: config |
| 4 | +--- |
| 5 | + |
| 6 | +## 1. Introduction |
| 7 | +The DSF BPE executes distributed workflows and provides three logging channels: **Standard Logs**, |
| 8 | +a **Data Logger** for introspection purposes, and **BPMN Debug Logs** for process plugin developers. |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +## Standard Logging |
| 13 | + |
| 14 | +| Purpose | Property Key | Environment Variable | Default | |
| 15 | +|---------|--------------|----------------------|---------| |
| 16 | +| External Log4j2 config | [`dev.dsf.log.config`](../bpe/configuration.md#dev-dsf-log-config) | [`DEV_DSF_LOG_CONFIG`](../bpe/configuration.md#dev-dsf-log-config) | `conf/log4j2.xml` | |
| 17 | +| Enable stderr logging | [`dev.dsf.log.console.err.enabled`](../bpe/configuration.md#dev-dsf-log-console-err-enabled) | [`DEV_DSF_LOG_CONSOLE_ERR_ENABLED`](../bpe/configuration.md#dev-dsf-log-console-err-enabled) | `false` | |
| 18 | +| Level for stderr | [`dev.dsf.log.console.err.level`](../bpe/configuration.md#dev-dsf-log-console-err-level) | [`DEV_DSF_LOG_CONSOLE_ERR_LEVEL`](../bpe/configuration.md#dev-dsf-log-console-err-level) | `INFO` | |
| 19 | +| Style for stderr | [`dev.dsf.log.console.err.style`](../bpe/configuration.md#dev-dsf-log-console-err-style) | [`DEV_DSF_LOG_CONSOLE_ERR_STYLE`](../bpe/configuration.md#dev-dsf-log-console-err-style) | `TEXT_COLOR` | |
| 20 | +| Enable stdout logging | [`dev.dsf.log.console.out.enabled`](../bpe/configuration.md#dev-dsf-log-console-out-enabled) | [`DEV_DSF_LOG_CONSOLE_OUT_ENABLED`](../bpe/configuration.md#dev-dsf-log-console-out-enabled) | `true` | |
| 21 | +| Level for stdout | [`dev.dsf.log.console.out.level`](../bpe/configuration.md#dev-dsf-log-console-out-level) | [`DEV_DSF_LOG_CONSOLE_OUT_LEVEL`](../bpe/configuration.md#dev-dsf-log-console-out-level) | `INFO` | |
| 22 | +| Style for stdout | [`dev.dsf.log.console.out.style`](../bpe/configuration.md#dev-dsf-log-console-out-style) | [`DEV_DSF_LOG_CONSOLE_OUT_STYLE`](../bpe/configuration.md#dev-dsf-log-console-out-style) | `TEXT_COLOR` | |
| 23 | +| Enable file logging | [`dev.dsf.log.file.enabled`](../bpe/configuration.md#dev-dsf-log-file-enabled) | [`DEV_DSF_LOG_FILE_ENABLED`](../bpe/configuration.md#dev-dsf-log-file-enabled) | `true` | |
| 24 | +| File log level | [`dev.dsf.log.file.level`](../bpe/configuration.md#dev-dsf-log-file-level) | [`DEV_DSF_LOG_FILE_LEVEL`](../bpe/configuration.md#dev-dsf-log-file-level) | `DEBUG` | |
| 25 | +| File log style | [`dev.dsf.log.file.style`](../bpe/configuration.md#dev-dsf-log-file-style) | [`DEV_DSF_LOG_FILE_STYLE`](../bpe/configuration.md#dev-dsf-log-file-style) | `TEXT_MDC` | |
| 26 | + |
| 27 | +--- |
| 28 | + |
| 29 | +## Data Logger |
| 30 | + |
| 31 | +| Purpose | Property Key | Environment Variable | Default | |
| 32 | +|---------|--------------|----------------------|---------| |
| 33 | +| Enable data log file | [`dev.dsf.log.data.file.enabled`](../bpe/configuration.md#dev-dsf-log-data-file-enabled) | [`DEV_DSF_LOG_DATA_FILE_ENABLED`](../bpe/configuration.md#dev-dsf-log-data-file-enabled) | `false` | |
| 34 | +| Data file style | [`dev.dsf.log.data.file.style`](../bpe/configuration.md#dev-dsf-log-data-file-style) | [`DEV_DSF_LOG_DATA_FILE_STYLE`](../bpe/configuration.md#dev-dsf-log-data-file-style) | `TEXT` | |
| 35 | +| Enable data logs on stdout | [`dev.dsf.log.data.console.out.enabled`](../bpe/configuration.md#dev-dsf-log-data-console-out-enabled) | [`DEV_DSF_LOG_DATA_CONSOLE_OUT_ENABLED`](../bpe/configuration.md#dev-dsf-log-data-console-out-enabled) | `false` | |
| 36 | +| Style for stdout | [`dev.dsf.log.data.console.out.style`](../bpe/configuration.md#dev-dsf-log-data-console-out-style) | [`DEV_DSF_LOG_DATA_CONSOLE_OUT_STYLE`](../bpe/configuration.md#dev-dsf-log-data-console-out-style) | `TEXT` | |
| 37 | +| Enable data logs on stderr | [`dev.dsf.log.data.console.err.enabled`](../bpe/configuration.md#dev-dsf-log-data-console-err-enabled) | [`DEV_DSF_LOG_DATA_CONSOLE_ERR_ENABLED`](../bpe/configuration.md#dev-dsf-log-data-console-err-enabled) | `false` | |
| 38 | +| Style for stderr | [`dev.dsf.log.data.console.err.style`](../bpe/configuration.md#dev-dsf-log-data-console-err-style) | [`DEV_DSF_LOG_DATA_CONSOLE_ERR_STYLE`](../bpe/configuration.md#dev-dsf-log-data-console-err-style) | `TEXT` | |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +## BPMN Debug Logging |
| 43 | + |
| 44 | +| Purpose | Property Key | Environment Variable | Default | |
| 45 | +|---------|--------------|----------------------|---------| |
| 46 | +| Log current DSF user | [`dev.dsf.bpe.debug.log.message.currentUser`](../bpe/configuration.md#dev-dsf-bpe-debug-log-message-currentuser) | [`DEV_DSF_BPE_DEBUG_LOG_MESSAGE_CURRENTUSER`](../bpe/configuration.md#dev-dsf-bpe-debug-log-message-currentuser) | `false` | |
| 47 | +| Log SQL statements | [`dev.dsf.bpe.debug.log.message.dbStatement`](../bpe/configuration.md#dev-dsf-bpe-debug-log-message-dbstatement) | [`DEV_DSF_BPE_DEBUG_LOG_MESSAGE_DBSTATEMENT`](../bpe/configuration.md#dev-dsf-bpe-debug-log-message-dbstatement) | `false` | |
| 48 | +| Log activity start | [`dev.dsf.bpe.debug.log.message.onActivityStart`](../bpe/configuration.md#dev-dsf-bpe-debug-log-message-onactivitystart) | [`DEV_DSF_BPE_DEBUG_LOG_MESSAGE_ONACTIVITYSTART`](../bpe/configuration.md#dev-dsf-bpe-debug-log-message-onactivitystart) | `false` | |
| 49 | +| Log activity end | [`dev.dsf.bpe.debug.log.message.onActivityEnd`](../bpe/configuration.md#dev-dsf-bpe-debug-log-message-onactivityend) | [`DEV_DSF_BPE_DEBUG_LOG_MESSAGE_ONACTIVITYEND`](../bpe/configuration.md#dev-dsf-bpe-debug-log-message-onactivityend) | `false` | |
| 50 | +| Log all variables | [`dev.dsf.bpe.debug.log.message.variables`](../bpe/configuration.md#dev-dsf-bpe-debug-log-message-variables) | [`DEV_DSF_BPE_DEBUG_LOG_MESSAGE_VARIABLES`](../bpe/configuration.md#dev-dsf-bpe-debug-log-message-variables) | `false` | |
| 51 | +| Log local variables only | [`dev.dsf.bpe.debug.log.message.variablesLocal`](../bpe/configuration.md#dev-dsf-bpe-debug-log-message-variableslocal) | [`DEV_DSF_BPE_DEBUG_LOG_MESSAGE_VARIABLESLOCAL`](../bpe/configuration.md#dev-dsf-bpe-debug-log-message-variableslocal) | `false` | |
| 52 | +| Log webservice requests | [`dev.dsf.bpe.debug.log.message.webserviceRequest`](../bpe/configuration.md#dev-dsf-bpe-debug-log-message-webservicerequest) | [`DEV_DSF_BPE_DEBUG_LOG_MESSAGE_WEBSERVICEREQUEST`](../bpe/configuration.md#dev-dsf-bpe-debug-log-message-webservicerequest) | `false` | |
| 53 | + |
| 54 | + |
| 55 | +## Logging Styles |
| 56 | +The DSF logging system supports multiple output styles that can be selected independently for each logging channel (console, file, audit, data). |
| 57 | +Every logger exposes a *.style property and a corresponding environment variable. |
| 58 | + |
| 59 | +### Text-Based Logging Styles |
| 60 | +#### TEXT |
| 61 | + |
| 62 | +Plain, unformatted text output (default for console output, used before DSF 2). |
| 63 | + |
| 64 | +Use when: |
| 65 | +- You want minimal overhead and simple logging. |
| 66 | +- Logs are read directly on the system. |
| 67 | + |
| 68 | +Avoid when: |
| 69 | +- A log aggregation system is used. |
| 70 | + |
| 71 | +#### TEXT_MDC |
| 72 | + |
| 73 | +Plain text with MDC (Mapped Diagnostic Context) fields, such as: |
| 74 | + |
| 75 | +- correlationId |
| 76 | +- processInstanceId |
| 77 | +- user |
| 78 | +- requestId |
| 79 | + |
| 80 | +Recommended for: |
| 81 | +- Production file logs |
| 82 | +- Debugging distributed workflows with correlation IDs |
| 83 | + |
| 84 | +Not ideal for: |
| 85 | +- A log aggregation system is used. |
| 86 | + |
| 87 | +#### TEXT_COLOR and TEXT_COLOR_MDC |
| 88 | + |
| 89 | +ANSI-colored text output for terminals. |
| 90 | + |
| 91 | +Recommended for: |
| 92 | +- Local development |
| 93 | +- Docker logs viewed directly with docker logs |
| 94 | +- Developers who want fast visual distinction between INFO/WARN/ERROR |
| 95 | + |
| 96 | +Avoid for: |
| 97 | +- Log ingestion systems |
| 98 | +- Consoles without ANSI escape code support |
| 99 | + |
| 100 | + |
| 101 | +### JSON-Based Logging Styles |
| 102 | +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 your log aggreation system of your choice. |
0 commit comments