Hi again, I found an AbstractLoggerWrapper class that looks suitable for this.
https://github.com/mybatis/mybatis-3/commit/6b7dd95d042b6e283c16eefbaa35a754184b7c9c Not sure if this is the right way but... works! :) 2013/4/11 Eduardo Macarron <[email protected]>: > HI all, > > We have just included a log4j 2 wrapper in MyBatis. It is trivial, it > just takes a class, implements org.apache.ibatis.logging.Log and > holds a log4j 2 Logger instance inside. > > https://github.com/mybatis/mybatis-3/blob/master/src/main/java/org/apache/ibatis/logging/log4j2/Log4j2Impl.java > > In the log4j and slf4j wrappers we use these methods so the logging > tool is able to know the right caller: > > Looger#log(String callerFQCN, Priority level, Object message, Throwable t) > LocationAwareLogger#log(Marker marker, String fqcn, int level, String > message, Object[] argArray, Throwable t) > > How can we port that code to Log4j 2? > > Thanks in advance!! --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
