[slf4j-user] log4j-over-slf4j version for log4j 1.2.17

Ceki ceki at qos.ch
Tue Jan 30 19:57:51 CET 2018



No there are no compatibility issues. Later versions of log4j-over-slf4j 
will have more of log4j replicated, However, in most cases older 
versions should work just as well.

HTH,

--
Ceki

On 30.01.2018 19:26, Debraj Manna wrote:
> Ok. Is there any version compatibility of log4j-over-slf4j and log4j? 
> For example if I am using log4j version 'x' then I should use 
> log4j-over-slf4j version 'y'?
> 
> On Tue, Jan 30, 2018 at 11:33 PM, Ceki <ceki at qos.ch 
> <mailto:ceki at qos.ch>> wrote:
> 
> 
>     You can use log4j-over-slf4j to route log4j calls to SLF4J which
>     will in turn invoke an underlying logging backed of your choice.
>     However, log4j-over-slf4j does not replicate all of log4j. In
>     particular, log4j-over-slf4j does not replicate org.apache.log4j.net
>     <http://org.apache.log4j.net>.SyslogAppender.
> 
> 
>     On 30.01.2018 18:56, Debraj Manna wrote:
> 
>         Something like the below code -
> 
>         import org.apache.log4j.Logger;
> 
>         Logger logger = Logger.getLogger(name);
> 
>         SyslogAppender appender = (SyslogAppender)
>         logger.getAppender(V_RNI_SYSLOG_LOGGER);
> 
>         ...
> 
>         appender.setLayout(new org.apache.log4j.PatternLayout("%c{2} %m
>         %n"));


More information about the slf4j-user mailing list