New

The executive guide to generative AI

Read more

Using another Logger

edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.

Using another Logger

edit

If you want to use another logger than Log4j 2, you can use SLF4J bridge to do that:

<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-to-slf4j</artifactId>
    <version>2.7</version>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.7.21</version>
</dependency>

This page lists implementations you can use. Pick your favorite logger and add it as a dependency. As an example, we will use the slf4j-simple logger:

<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-simple</artifactId>
    <version>1.7.21</version>
</dependency>
Was this helpful?
Feedback