You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the docs at https://logging.apache.org/log4j/2.x/manual/layouts.html#patterns it gives an example pattern %c{1.2.*} that should transform something like org.apache.commons.test.Foo to o.a.c.test.Foo, but I'm seeing it transform into o.ap.commons.test.Foo instead.
In general, the configuration I want here is to collapse all the parts of the package name to single letters except for the last package name part before the class name which is what that example precision looks to do.
Configuration
Version: 2.23.1
Operating system: macOS
JDK: Java 21
Logs
[Stacktraces, errors, etc. relevant applications logs.]
Reproduction
Use %c{1.2.*} in a pattern layout with a logger name such as org.apache.logging.log4j.core.config.AbstractConfiguration which should output o.a.l.l.c.config.AbstractConfiguration. Sample config snippet:
Description
In the docs at https://logging.apache.org/log4j/2.x/manual/layouts.html#patterns it gives an example pattern
%c{1.2.*}
that should transform something likeorg.apache.commons.test.Foo
too.a.c.test.Foo
, but I'm seeing it transform intoo.ap.commons.test.Foo
instead.In general, the configuration I want here is to collapse all the parts of the package name to single letters except for the last package name part before the class name which is what that example precision looks to do.
Configuration
Version: 2.23.1
Operating system: macOS
JDK: Java 21
Logs
Reproduction
Use
%c{1.2.*}
in a pattern layout with a logger name such asorg.apache.logging.log4j.core.config.AbstractConfiguration
which should outputo.a.l.l.c.config.AbstractConfiguration
. Sample config snippet:Example output:
Expected output:
The text was updated successfully, but these errors were encountered: