- Debezium uses Log4j for logging and currently logs stacktraces over multiple lines.
- As a result some infrastructure components for monitoring can not link the different lines of the stacktrace together and interpret every line as a new log event.
- Therefore, monitoring alerts filters often miss required context to determine whether an alert should be send.
Debezium 1.1.0.Final introduced a retry-mechanism for lost Postgres connections but the following is still logged when a disconnect occurs
Since Debezium will reconnect to Postgres, no alert should be send since Debezium automatically recovers from the issue. However, the SocketException could still be interpreted as an issue to alert on since it misses the context of it occurring for a Postgres reconnect.
- The possibility to log the different lines of a stacktrace as a single log event. E.g. by allowing to log in JSON format.
- This is supported out-of-the-box by Log4j2 but not by Log4j (1): https://logging.apache.org/log4j/2.x/manual/layouts.html#JSONLayout
- There are solutions using Log4j (1) + Logback: https://docs.datadoghq.com/logs/log_collection/java/?tab=log4j
- There are log4j extensions that could provide the functionality: https://github.com/logstash/log4j-jsonevent-layout
- We are using Debezium through the provided Docker container so we'd like to configure the functionality as mentioned in https://debezium.io/documentation/reference/operations/logging.html#configuring-log-level-docker