You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a new logging-support module to java-core providing a Logback PatternConverter (StructuredArgumentsConverter) that renders StructuredArguments.kv() fields in plain-text log output (dev and test environments).
Note
This converter is intended exclusively for developer and test log configurations (logback-dev.xml, logback-test.xml). It is not used in production — production logback configs use LogstashEncoder, which already serialises kv() fields as JSON. The converter class will be present in the production fat JAR but is never instantiated.
Background
The logstash-logback-encoder library's kv() arguments are JSON-only by default — they do not appear in plain Logback text output. To keep kv() as the structured logging API across all services while still showing the key-value pairs in developer/test console output, a custom ClassicConverter is needed.
Implementation
New module logging-support with logstash-logback-encoder as an optional dependency.
Task specification
Add a new
logging-supportmodule tojava-coreproviding a LogbackPatternConverter(StructuredArgumentsConverter) that rendersStructuredArguments.kv()fields in plain-text log output (dev and test environments).Note
This converter is intended exclusively for developer and test log configurations (
logback-dev.xml,logback-test.xml). It is not used in production — production logback configs useLogstashEncoder, which already serialiseskv()fields as JSON. The converter class will be present in the production fat JAR but is never instantiated.Background
The
logstash-logback-encoderlibrary'skv()arguments are JSON-only by default — they do not appear in plain Logback text output. To keepkv()as the structured logging API across all services while still showing the key-value pairs in developer/test console output, a customClassicConverteris needed.Implementation
New module
logging-supportwithlogstash-logback-encoderas an optional dependency.Class:
com.wultra.core.logging.logback.StructuredArgumentsConverterUsage in logback XML (dev/test only):
Example output:
References