logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eduardo Macarron <eduardo.macar...@gmail.com>
Subject Re: FQCN in log4j 2
Date Thu, 11 Apr 2013 16:22:55 GMT
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.macarron@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-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message