Ole :
This question is the same question as this question (But for log4j2): log4j: abbreviate/shorten package names
rgoers :
This is quite simple and is documented at http://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout. In your patternLayout
just specify %c{1.}
in the pattern to get the abbreviated Logger
name. If you want the class name instead, use %C{1.}
.
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=453059&siteId=1