Repository: provectus/kafka-ui
Issue: Fix different lombok logging annotations
Labels: good first issue
scope/backend
type/chore
hacktoberfest

For some reason we use both `@slf4j` and `@log4j2`. 

Issue comments:
Hi @Haarolean,

Can I try to fix it (if so, can you assign the task to me)?

What do you prefer the default for me to replace one with the other?
Hey, sure thing! 

I'd suggest we use log4j since it's being used more and and way longer than slf4j.

Pull request review comments:

Patch that resolved the issue:
diff --git a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/ClusterUtil.java b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/ClusterUtil.java
index 3c21232539f..22730d6c815 100644
--- a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/ClusterUtil.java
+++ b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/ClusterUtil.java
@@ -32,7 +32,7 @@
 import java.util.Set;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
-import lombok.extern.slf4j.Slf4j;
+import lombok.extern.log4j.Log4j2;
 import org.apache.kafka.clients.admin.AdminClient;
 import org.apache.kafka.clients.admin.Config;
 import org.apache.kafka.clients.admin.ConfigEntry;
@@ -49,7 +49,7 @@
 import reactor.core.publisher.Mono;
 import reactor.util.function.Tuple2;
 
-@Slf4j
+@Log4j2
 public class ClusterUtil {
 
   private static final String CLUSTER_VERSION_PARAM_KEY = "inter.broker.protocol.version";
diff --git a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/JmxClusterUtil.java b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/JmxClusterUtil.java
index 2cf3f46b74b..8112ab6b6a6 100644
--- a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/JmxClusterUtil.java
+++ b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/JmxClusterUtil.java
@@ -19,13 +19,13 @@
 import javax.management.remote.JMXConnector;
 import lombok.RequiredArgsConstructor;
 import lombok.SneakyThrows;
-import lombok.extern.slf4j.Slf4j;
+import lombok.extern.log4j.Log4j2;
 import org.apache.commons.pool2.KeyedObjectPool;
 import org.jetbrains.annotations.Nullable;
 import org.springframework.stereotype.Component;
 
 @Component
-@Slf4j
+@Log4j2
 @RequiredArgsConstructor
 public class JmxClusterUtil {
 
diff --git a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/JmxPoolFactory.java b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/JmxPoolFactory.java
index c5e7f91fe80..405d30b0b47 100644
--- a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/JmxPoolFactory.java
+++ b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/util/JmxPoolFactory.java
@@ -8,13 +8,13 @@
 import javax.management.remote.JMXConnectorFactory;
 import javax.management.remote.JMXServiceURL;
 import javax.rmi.ssl.SslRMIClientSocketFactory;
-import lombok.extern.slf4j.Slf4j;
+import lombok.extern.log4j.Log4j2;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.pool2.BaseKeyedPooledObjectFactory;
 import org.apache.commons.pool2.PooledObject;
 import org.apache.commons.pool2.impl.DefaultPooledObject;
 
-@Slf4j
+@Log4j2
 public class JmxPoolFactory extends BaseKeyedPooledObjectFactory<JmxConnectionInfo, JMXConnector> {
 
   @Override


Test patch:
diff --git a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/base/BaseTest.java b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/base/BaseTest.java
index a5ac78f5660..477f7ed49c5 100644
--- a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/base/BaseTest.java
+++ b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/base/BaseTest.java
@@ -9,7 +9,7 @@
 import io.github.cdimascio.dotenv.Dotenv;
 import io.qameta.allure.selenide.AllureSelenide;
 import lombok.SneakyThrows;
-import lombok.extern.slf4j.Slf4j;
+import lombok.extern.log4j.Log4j2;
 import org.apache.commons.io.FileUtils;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.DisplayNameGeneration;
@@ -22,7 +22,7 @@
 import java.io.IOException;
 import java.util.Arrays;
 
-@Slf4j
+@Log4j2
 @DisplayNameGeneration(CamelCaseToSpacedDisplayNameGenerator.class)
 public class BaseTest {