Details
-
Improvement
-
Resolution: Won't Fix
-
Major
-
None
-
1.1.2
-
None
Description
If you want the default value of a MDC lookup to be the result of a different MDC lookup (or any other variable/substitution) it does not work.
%X{mdcKey:-%X{defaultKey}} should be allowed. Instead if %X{mdcKey} is not defined the log output is the literal string "%X{defaultKey}" instead of performing an MDC lookup on the defaultKey.
For example, we are trying to use the following pattern.
<encoder> <pattern>%d{ISO8601} %-5level [%thread] [%X{signature}:%c{0}] %msg%n</pattern> </encoder>
However, %c{0} is never parsed or turned into the name of the logger.
Best I can tell from looking at the code the default value of a MDC token is never parsed.
Attachments
Issue Links
- links to