Yes - that is exactly what the class is for.  You can find couple examples of 
how to use it in the SLF4J adapter and the JCL bridge sub projects.

Ralph


On Apr 11, 2013, at 9:22 AM, Eduardo Macarron wrote:

> 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 <eduardo.macar...@gmail.com>:
>> 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: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

Reply via email to