logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schudt, Christian" <Christian.Sch...@cgm.com>
Subject Log4j 2 Conversion Pattern + negative precision
Date Thu, 03 Dec 2015 12:11:33 GMT
Hello,

log4j 1 has the possibiliy to specify a negative precision for the logger name in the pattern,
e.g.:

c{-4}

which meant, that the 4 left most package names were excluded.

E.g. "org.apache.logging.log4j.core.LogEvent" becomes "core.LogEvent"

In Log4j2, this pattern results in:

"-.-.-.-.core.LogEvent"

How can I achieve the log4j 1 behavior, i.e. excluded the first X package names?

Thanks,
Christian

Related documentation:
http://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message