How to connect SLF4J to Ignite

Let’s assume, that you already have configured SLF4J in your project. It remains to do two things.

Add dependency:

<dependency>
    <groupId>org.apache.ignite</groupId>
    <artifactId>ignite-slf4j</artifactId>
    <version>...</version>
</dependency>

Configure Ignite:

public IgniteConfiguration clientIgniteConfiguration(/*CommunicationSpi communicationSpi, */SslContextFactory sslContextFactory) {
    IgniteConfiguration igniteConfiguration = new IgniteConfiguration();
    igniteConfiguration.setGridLogger(new Slf4jLogger());
    ...
    return igniteConfiguration;
}
Telegram channel

If you still have any questions, feel free to ask me in the comments under this article or write me at promark33@gmail.com.

If I saved your day, you can support me 🤝

Leave a Reply

Your email address will not be published. Required fields are marked *