This looks like a simple enough fix that I'm hoping I don't need to do a checkout and provide a proper patch file. logback-classic\src\main\java\ch\qos\logback\classic\PatternLayout.java currently contains these 2 lines (starting at line # 124 as of 1.0.7):
There is a "contextNameTest" in logback-classic\src\test\java\ch\qos\logback\classic\PatternLayoutTest.java - but it tests only for "%contextName", and not "%cn". This could potentially be expanded upon as well - but I don't see that most of the other conversion words are tested here currently, either..
Any chance this can be included in the next release?
This looks like a simple enough fix that I'm hoping I don't need to do a checkout and provide a proper patch file. logback-classic\src\main\java\ch\qos\logback\classic\PatternLayout.java currently contains these 2 lines (starting at line # 124 as of 1.0.7):
defaultConverterMap.put("cn", ContextNameAction.class.getName());
defaultConverterMap.put("contextName", ContextNameConverter.class.getName());
The first of these lines needs to instead be:
defaultConverterMap.put("cn", ContextNameConverter.class.getName());
I.E., "Converter" instead of "Action".
There is a "contextNameTest" in logback-classic\src\test\java\ch\qos\logback\classic\PatternLayoutTest.java - but it tests only for "%contextName", and not "%cn". This could potentially be expanded upon as well - but I don't see that most of the other conversion words are tested here currently, either..
Any chance this can be included in the next release?