Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.11.0, 2.11.1
-
None
Description
When I use LoggernPatternConverter in beginning of my layout it outputs as expected
<PatternLayout pattern="%c{1.1.*} %date{HH:mm:ss.SSS} %-5level %-25thread| %msg%n%xThrowable"/>
c.k.zoo.CuratorEnsembleProvider 16:48:13.175 INFO main | Connecting to ensemble on [localhost]:8080
However when I move converter to the end of the layout it stops abbreviating logger name parts.
<PatternLayout pattern="%date{HH:mm:ss.SSS} %-5level %-25thread| %c{1.1.*} %msg%n%xThrowable"/>
16:47:38.687 INFO main | com.kamagames.zoo.CuratorEnsembleProvider Connecting to ensemble on [localhost]:8080
I believe it's caused by code in NameAbbreviator which stops processing first pattern fragments when abbreviated string length is larger than current position in StringBuilder
for (int i = 0; i < fragments.length - 1 && pos < original.length(); i++) { pos = fragments[i].abbreviate(sb, pos); }
Attachments
Issue Links
- links to