You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2021/08/12 01:53:06 UTC

[GitHub] [logging-log4j2] carterkozak commented on pull request #542: LOG4J2-2785: Added support for pattern Layout to abbreviate logger or class names except n rightmost words

carterkozak commented on pull request #542:
URL: https://github.com/apache/logging-log4j2/pull/542#issuecomment-897285253


   When I have some time to tinker, I think this feature could be added to the existing abbreviator. All existing patterns effectively use `rightWordCount=1`, however we could make that configurable and allow existing options to work with this.
   
   Something along the lines of 
   ```java
   int limit = input.length();
   for (int i = 0; I < rightWordCount; I++) {
       limit = input.lastIndexOf('.', limit);
       if (limit < 0) {
           return input;
       }
   }
   // call into standard abbreviator.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org