In an application using log4j with slf4j, I am trying to use a dependency
(elasticsearch in this) which depends on log4j2.

The application's logging dependency looks like this-

<dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch</artifactId>
    <version>5.6.16</version>
</dependency>
<dependency>
    <groupId>org.elasticsearch.client</groupId>
    <artifactId>transport</artifactId>
    <version>5.6.16</version>
</dependency>
<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-to-slf4j</artifactId>
    <version>2.11.1</version>
</dependency>


The application is using its own log4j.xml and has some custom
appenders of log4j so it cannot be migrated to log4j2 without
rewriting the appenders.

Added the below dependencies as suggested in elasticsearch
documentation 
<https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/_using_another_logger.html>
for using a different logger other than log4j2.

<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-to-slf4j</artifactId>
    <version>2.11.1</version>
</dependency>

But now on starting the application, I am seeing some warnings like below

DEBUG StatusLogger org.slf4j.helpers.Log4jLoggerFactory is not on
classpath. Good!
DEBUG StatusLogger Using ShutdownCallbackRegistry class
org.apache.logging.log4j.core.util.DefaultShutdownCallbackRegistry
WARN StatusLogger Multiple logging implementations found:
Factory: org.apache.logging.log4j.core.impl.Log4jContextFactory, Weighting: 10
Factory: org.apache.logging.slf4j.SLF4JLoggerContextFactory, Weighting: 15
Using factory: org.apache.logging.slf4j.SLF4JLoggerContextFactory

Can someone let me know what does this warning denote? How can I remove it?

Reply via email to