[slf4j-dev] Apache logging log4j over slf4j

Remko Popma remko.popma at gmail.com
Wed Jan 10 03:42:27 CET 2018


 

> On Jan 10, 2018, at 11:04, Damien <maitredede at gmail.com> wrote:
> 
> Hi,
> 
> Also, correct me if I am wrong, but the log4j-slf4j-impl module is to allow slf4j app to log to log4j, but I want a log4j2 app to log to slf4j...

If you want to go the opposite way you should exclude log4j-core and use the log4j-to-slf4j module. See:
https://logging.apache.org/log4j/2.x/faq.html#which_jars


> 
> Damien
> 
> 2018-01-10 12:21 GMT+11:00 Remko Popma <remko.popma at gmail.com>:
>> Hi Damien,
>> 
>> You can’t use the log4j-over-slf4j adapter (it only works with Log4j 1.2). 
>> 
>> Log4j2 includes an slf4j adapter: the log4j-slf4j-impl module. See https://logging.apache.org/log4j/2.x/log4j-to-slf4j/index.html
>> 
>> Remko
>> 
>> (Shameless plug) Every java main() method deserves http://picocli.info
>> 
>> 
>> 
>>> On Wed, Jan 10, 2018 at 10:13 Damien <maitredede at gmail.com> wrote:
>>> Hi :),
>>> 
>>> I am using a lib that uses log4j 2 (apache.logging.log4j.*).
>>> 
>>> My build script (graddle) has easily replaced log4j 1 libs with log4j-over-slf4j, but does not handle log4j 2.
>>> 
>>> Is there a version for log4j 2 ? Or is someone working on it ?
>>> 
>>> Thanks :)
>>> 
>>> Damien
>>> _______________________________________________
>>> slf4j-dev mailing list
>>> slf4j-dev at qos.ch
>>> http://mailman.qos.ch/mailman/listinfo/slf4j-dev
>> 
>> _______________________________________________
>> slf4j-dev mailing list
>> slf4j-dev at qos.ch
>> http://mailman.qos.ch/mailman/listinfo/slf4j-dev
> 
> _______________________________________________
> slf4j-dev mailing list
> slf4j-dev at qos.ch
> http://mailman.qos.ch/mailman/listinfo/slf4j-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-dev/attachments/20180110/d2039ae1/attachment-0001.html>


More information about the slf4j-dev mailing list