This has the issue but the fix is easy and 100% belonging to the Log impl jar: http://svn.apache.org/repos/asf/openwebbeans/microwave/trunk/microwave-core/src/main/java/org/apache/microwave/logging/log4j2/MicrowaveLogEventFactory.java and http://svn.apache.org/repos/asf/openwebbeans/microwave/trunk/microwave-core/src/main/resources/log4j2.component.properties
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> | JavaEE Factory <https://javaeefactory-rmannibucau.rhcloud.com> 2016-10-25 16:38 GMT+02:00 Rainer Jung <rainer.j...@kippdata.de>: > 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 > >