apache / apache/logging-log4j2
Runtime or docs are wrong for %logger{1.2.*}
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.7k
- Avg merge
- 21h 30m
- Merged PRs (30d)
- 27
Description
## Description
Either the runtime or docs are wrong for layouts like `%logger{1.2.*}`.
The docs on page https://logging.apache.org/log4j/2.x/manual/pattern-layout.html say:
```
%c{1.2.*} | org.apache.commons.test.Foo | o.a.c.test.Foo
```
IOW, these docs say that only last 2 segments only are not abbreviated.
At runtime, in 2.24.1, I see, the opposite, the first 2 are abbreviated instead, for example
```
2024-10-29T09:50:57,046-0400 DEBUG [qtp1445038386-63][c.rs.seagull.httpmonitor.MyDomainClassName.50698c70] 865192895 async write complete of org.eclipse.jetty.ee9.proxy.MyDomainClassName$Chunk@76fdb2fc (17 bytes) on HttpOutput@7d59c816{s=OPEN,api=READY,sc=false,e=null}
```
How do I say I want to abbreviate everything except the last N?
## Configuration
**Version:** 2.24.1
Microsoft Windows [Version 10.0.19045.5011]
openjdk version "17.0.12" 2024-07-16
OpenJDK Runtime Environment Temurin-17.0.12+7 (build 17.0.12+7)
OpenJDK 64-Bit Server VM Temurin-17.0.12+7 (build 17.0.12+7, mixed mode, sharing)
Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: C:\java\apache-maven-3.9.9
Java version: 17.0.12, vendor: Eclipse Adoptium, runtime: C:\Program Files\Eclipse Adoptium\jdk-17.0.12.7-hotspot
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Docker version 27.3.1, build ce12230
## Reproduction
```xml
```
## Logs
Same as above:
```
2024-10-29T09:50:57,046-0400 DEBUG [qtp1445038386-63][c.rs.seagull.httpmonitor.MyDomainClassName.50698c70] 865192895 async write complete of org.eclipse.jetty.ee9.proxy.MyDomainClassName$Chunk@76fdb2fc (17 bytes) on HttpOutput@7d59c816{s=OPEN,api=READY,sc=false,e=null}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.