Am 25.10.2016 um 15:33 schrieb Romain Manni-Bucau:
Hi guys,

since now tomcat has Log API as a SPI doing 2 is easy (
http://svn.apache.org/repos/asf/openwebbeans/microwave/trunk/microwave-core/src/main/java/org/apache/microwave/logging/tomcat/Log4j2Log.java)
and
just a drop-in jar setup so not sure it needs to be in tomcat default
delivery.

I tried to plug in Log4j2Log.java using SPI. It gets used, but it doesn't fix the problem. Now the location info points to Log4j2Log instead of DirectJDKLog. The Problem of one indirection layer to much above Log4Js has't changed.

I think the jul log bridge removes one frame, which is the jul loger, ending up taking the DirectJDKLog which vcalls the jul logger as its location. Using your approach does no longer use jul, so log4j2 doesn't re move a frame and again takes the wrong class Log4j2Log as its location info.

I think delegating is not enough, you actually need to implement the target API or extend a target implementation.

Did you check the location info using the SPI approach?

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