Hi everyone,

when using TC 8.5 with the Log4J2 jul bridge the location info in the Log4J output points to the juli class DirectJDKLog instead of the Tomcat class with the juli log call. Only the category/logger name is correct:

%c: org.apache.catalina.core.StandardServer (Example, correct)
%C: org.apache.juli.logging.DirectJDKLog
%l: org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:179)
%M: log
%F: DirectJDKLog.java
%L: 179

The jul bridge does not try to fully populate al possible location info, but instead only the category name. Log4J then later gets the log location from the stack frame that calls the jul bridge which always gives org.apache.juli.logging.DirectJDKLog.

It seems we either need to directly call the jul bridge without an intermediate logging impl class, or the Log4J2 jul bridge must be made more complex.

Any opinion? Ideas?

I know that the location info is expensive to get, but failing to support the correct location info is IMHO bad. The old adapter solution supported correct location info in log4j.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to