'Method name and line number is not showing after log4j version changed to 2.17.0
After changing log4j version from 2.15 to 2.17.0, method name and line no. is not printing in logs.
I am using following pattern:
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} [%t] %-5p %c{1.}.%M():%L %X - %m%n" />
I have used includeLocation=true also:
<Logger name="com.xyx.abc" additivity="false" includeLocation="true"> <appender-ref ref="RollingFile" level="INFO" /></Logger>
Sample log:
2022-03-14 13:57:50,111 [http-nio2-8080-exec-16] INFO c.p.p.a.s.w.i.className.(): {abc=111,pqr=22222, Id=202203141} - Invalid mode
In above log, method name and line no. is not printing, instead () is getting printed.
Please help
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
