Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
The following are my favorite patterns
%c{2} - which displays the corresponding number of rightmost logger name components. So a logger with a name like "org.apache.commons.Foo" is displayed as "commons.Foo".
and
%c{1.} - which abbreviates the name based on the pattern. So a logger with a name like "org.apache.commons.Foo" is displayed as "o.a.c.Foo".
Is there a way to combine the two. I want to abbreviate the name of all logger components except the 2 rightmost. Such that "org.apache.commons.Foo" is displayed as "o.a.commons.Foo".
Attachments
Issue Links
- duplicates
-
LOG4J2-2401 Extend %c conversion pattern - separately control the number of characters in each class component and the number of elements that are fully specified
- Open
- is duplicated by
-
LOG4J2-241 Support the ability to trim logger name from the right.
- Resolved
- links to