From c6fccd1d3f6b8f66fced640171e3984e43380981 Mon Sep 17 00:00:00 2001 From: Nikolay Gagarinov Date: Tue, 4 Aug 2026 22:53:57 +0500 Subject: [PATCH] fix(logging): emit the log level in JSON logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The JSON encoder was configured with a provider, but logstash-logback-encoder has no such provider — LoggingEventJsonProviders exposes addLogLevel and addLogLevelValue, not addLevel. Logback silently dropped the element and only hinted at it in its startup status output: |-WARN in ch.qos.logback.core.model.processor.ImplicitModelHandler - Ignoring unknown property [level] in [net.logstash.logback.composite.loggingevent.LoggingEventJsonProviders] So every log line went out without a level, while app/environment/instance survived because they come from the separate, valid provider. That made the breakage easy to miss: nothing failed, the logs were still valid JSON, and only one field was quietly absent. Verified with ./gradlew bootRun on the dev profile. Before: 0 of 38 lines had a level field and the warning above was present. After: all 46 lines carry level, spanning DEBUG/INFO/WARN, and the warning is gone. --- src/main/resources/logback-spring.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index a061bae..945e0d0 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -15,7 +15,7 @@ - +