Repository: camunda/camunda
Pull request #29647: Removes unnecessary Atomix contextual logger
Author: login: npepinpe
Labels: name: component/zeebe
description: Related to the Zeebe component/team
name: backport stable/8.7
description: Backport a pull request to stable/8.7
name: version:8.7.0
description: Marks an issue as being completely or in parts released in 8.7.0
Created: 2025-03-16T20:16:19Z | Merged: 2025-03-18T18:25:55Z

## Description

This PR removes Atomix's `ContextualLogger` utility. We already set the following MDC context for the thread:

```
actor-name=raft-server-<Raft Partition ID>
actor-scheduler=Broker-<Node ID>
partitionId=<Raft Partition ID>
raft-role=<ROLE>
```

> [!Note]
> One thing that comes to mind: we probably want to standardize the keys so we can more easily correlate logs, metrics, and in the future, traces.

Further adding context is just unnecessary now, and is a holdover from Atomix. It's also just noise at this point.

The previous logs looked like:

```
[2025-03-16 20:14:51.341] [raft-server-0-1] [{actor-name=raft-server-1, actor-scheduler=Broker-0, partitionId=1}] INFO
	io.atomix.raft.impl.RaftContext - RaftServer{raft-partition-partition-1} - Transitioning to FOLLOWER
[2025-03-16 20:14:51.345] [raft-server-0-1] [{actor-name=raft-server-1, actor-scheduler=Broker-0, partitionId=1}] INFO
	io.atomix.raft.roles.FollowerRole - RaftServer{raft-partition-partition-1}{role=FOLLOWER} - Single member cluster. Transitioning directly to candidate.
[2025-03-16 20:14:51.345] [raft-server-0-1] [{actor-name=raft-server-1, actor-scheduler=Broker-0, partitionId=1}] INFO
	io.atomix.raft.impl.RaftContext - RaftServer{raft-partition-partition-1} - Transitioning to CANDIDATE
[2025-03-16 20:14:51.346] [raft-server-0-1] [{actor-name=raft-server-1, actor-scheduler=Broker-0, partitionId=1}] INFO
	io.atomix.raft.roles.CandidateRole - RaftServer{raft-partition-partition-1}{role=CANDIDATE} - Single member cluster. Transitioning directly to leader.
[2025-03-16 20:14:51.348] [raft-server-0-1] [{actor-name=raft-server-1, actor-scheduler=Broker-0, partitionId=1}] INFO
	io.atomix.raft.impl.RaftContext - RaftServer{raft-partition-partition-1} - Transitioning to LEADER
[2025-03-16 20:14:51.354] [raft-server-0-1] [{actor-name=raft-server-1, actor-scheduler=Broker-0, partitionId=1}] INFO
	io.atomix.raft.impl.RaftContext - RaftServer{raft-partition-partition-1} - Found leader 0
[2025-03-16 20:14:51.362] [raft-server-0-1] [{actor-name=raft-server-1, actor-scheduler=Broker-0, partitionId=1}] INFO
	io.atomix.raft.impl.RaftContext - RaftServer{raft-partition-partition-1} - Commit index is 1. RaftServer is ready
[2025-03-16 20:14:51.365] [raft-server-0-1] [{actor-name=raft-server-1, actor-scheduler=Broker-0, partitionId=1}] INFO
	io.atomix.raft.impl.DefaultRaftServer - RaftServer{raft-partition-partition-1} - Server join completed. Waiting for the server to be READY
```

And now they look like:

```
[2025-03-16 21:07:02.860] [zb-actors-1] [{actor-name=Startup, actor-scheduler=Broker-0}] INFO 
	io.atomix.raft.partition.impl.RaftPartitionServer - Server bootstrapping partition PartitionId{id=1, group=raft-partition}
[2025-03-16 21:07:02.865] [raft-server-0-1] [{actor-name=raft-server-1, actor-scheduler=Broker-0, partitionId=1, raft-role=INACTIVE}] INFO 
	io.atomix.raft.impl.RaftContext - Transitioning to FOLLOWER
[2025-03-16 21:07:02.868] [raft-server-0-1] [{actor-name=raft-server-1, actor-scheduler=Broker-0, partitionId=1, raft-role=FOLLOWER}] INFO 
	io.atomix.raft.roles.FollowerRole - Single member cluster. Transitioning directly to candidate.
[2025-03-16 21:07:02.868] [raft-server-0-1] [{actor-name=raft-server-1, actor-scheduler=Broker-0, partitionId=1, raft-role=FOLLOWER}] INFO 
	io.atomix.raft.impl.RaftContext - Transitioning to CANDIDATE
[2025-03-16 21:07:02.871] [raft-server-0-1] [{actor-name=raft-server-1, actor-scheduler=Broker-0, partitionId=1, raft-role=CANDIDATE}] INFO 
	io.atomix.raft.roles.CandidateRole - Single member cluster. Transitioning directly to leader.
[2025-03-16 21:07:02.873] [raft-server-0-1] [{actor-name=raft-server-1, actor-scheduler=Broker-0, partitionId=1, raft-role=CANDIDATE}] INFO 
	io.atomix.raft.impl.RaftContext - Transitioning to LEADER
[2025-03-16 21:07:02.877] [raft-server-0-1] [{actor-name=raft-server-1, actor-scheduler=Broker-0, partitionId=1, raft-role=LEADER}] INFO 
	io.atomix.raft.impl.RaftContext - Found leader 0
[2025-03-16 21:07:02.886] [raft-server-0-1] [{actor-name=raft-server-1, actor-scheduler=Broker-0, partitionId=1, raft-role=LEADER}] INFO 
	io.atomix.raft.impl.RaftContext - Commit index is 46. RaftServer is ready
[2025-03-16 21:07:02.891] [raft-server-0-1] [{actor-name=raft-server-1, actor-scheduler=Broker-0, partitionId=1, raft-role=LEADER}] INFO 
	io.atomix.raft.impl.DefaultRaftServer - Server join completed. Waiting for the server to be READY
```



Diff:
diff --git a/zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/DefaultRaftServer.java b/zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/DefaultRaftServer.java
index 8106d56131b2..d8273e0ce59b 100644
--- a/zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/DefaultRaftServer.java
+++ b/zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/DefaultRaftServer.java
@@ -27,8 +27,6 @@
 import io.atomix.raft.cluster.RaftMember.Type;
 import io.atomix.raft.impl.RaftContext.State;
 import io.atomix.raft.storage.RaftStorage;
-import io.atomix.utils.logging.ContextualLoggerFactory;
-import io.atomix.utils.logging.LoggerContext;
 import io.camunda.zeebe.util.health.FailureListener;
 import java.util.Collection;
 import java.util.Map;
@@ -38,6 +36,7 @@
 import java.util.function.Consumer;
 import java.util.function.Supplier;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Provides a standalone implementation of the <a href="http://raft.github.io/">Raft consensus
@@ -46,9 +45,9 @@
  * @see RaftStorage
  */
 public class DefaultRaftServer implements RaftServer {
+  private static final Logger LOGGER = LoggerFactory.getLogger(DefaultRaftServer.class);
 
   protected final RaftContext context;
-  private final Logger log;
   private final AtomicReference<CompletableFuture<RaftServer>> openFutureRef =
       new AtomicReference<>();
   private volatile boolean started;
@@ -56,10 +55,6 @@ public class DefaultRaftServer implements RaftServer {
 
   public DefaultRaftServer(final RaftContext context) {
     this.context = checkNotNull(context, "context cannot be null");
-    log =
-        ContextualLoggerFactory.getLogger(
-            getClass(),
-            LoggerContext.builder(RaftServer.class).addValue(context.getName()).build());
   }
 
   @Override
@@ -197,7 +192,7 @@ private CompletableFuture<RaftServer> start(final Supplier<CompletableFuture<Voi
           .whenComplete(
               (result, error) -> {
                 if (error == null) {
-                  log.info("Server join completed. Waiting for the server to be READY");
+                  LOGGER.info("Server join completed. Waiting for the server to be READY");
                   context.addStateChangeListener(new StartedStateListener(this));
                 } else {
                   openFutureRef.get().completeExceptionally(error);
@@ -210,11 +205,11 @@ private CompletableFuture<RaftServer> start(final Supplier<CompletableFuture<Voi
         .whenComplete(
             (result, error) -> {
               if (error == null) {
-                log.debug("Server started successfully!");
+                LOGGER.debug("Server started successfully!");
               } else if (error instanceof CancelledBootstrapException) {
-                log.debug("Server bootstrap cancelled", error);
+                LOGGER.debug("Server bootstrap cancelled", error);
               } else {
-                log.warn("Failed to start server", error);
+                LOGGER.warn("Failed to start server", error);
               }
             });
   }
diff --git a/zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/LogCompactor.java b/zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/LogCompactor.java
index 280491f77689..1b697919683d 100644
--- a/zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/LogCompactor.java
+++ b/zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/LogCompactor.java
@@ -14,8 +14,11 @@
 import io.camunda.zeebe.util.VisibleForTesting;
 import org.agrona.LangUtil;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public final class LogCompactor {
+  private static final Logger LOGGER = LoggerFactory.getLogger(LogCompactor.class);
+
   private final ThreadContext threadContext;
   private final RaftLog log;
 
@@ -24,7 +27,6 @@ public final class LogCompactor {
   private final int replicationThreshold;
 
   // hard coupled state
-  private final Logger logger;
   private final RaftServiceMetrics metrics;
 
   // used when performing compaction; may be updated from a different thread
@@ -34,13 +36,11 @@ public LogCompactor(
       final ThreadContext threadContext,
       final RaftLog log,
       final int replicationThreshold,
-      final RaftServiceMetrics metrics,
-      final Logger logger) {
+      final RaftServiceMetrics metrics) {
     this.threadContext = threadContext;
     this.log = log;
     this.replicationThreshold = replicationThreshold;
     this.metrics = metrics;
-    this.logger = logger;
   }
 
   @VisibleForTesting
@@ -56,7 +56,7 @@ public long getCompactableIndex() {
    */
   @VisibleForTesting
   void setCompactableIndex(final long index) {
-    logger.trace("Updated compactable index to {}", index);
+    LOGGER.trace("Updated compactable index to {}", index);
     compactableIndex = index;
   }
 
@@ -98,10 +98,10 @@ private boolean compact(final long index) {
 
     try (final var ignored = metrics.compactionTime()) {
       final var compacted = log.deleteUntil(index);
-      logger.debug("Compacted log up to index {}", index);
+      LOGGER.debug("Compacted log up to index {}", index);
       return compacted;
     } catch (final Exception e) {
-      logger.error("Failed to compact up to index {}", index, e);
+      LOGGER.error("Failed to compact up to index {}", index, e);
       LangUtil.rethrowUnchecked(e);
       return false;
     }
@@ -109,13 +109,13 @@ private boolean compact(final long index) {
 
   private void onSnapshotCompactionBound(final Long index, final Throwable error) {
     if (error != null) {
-      logger.error(
+      LOGGER.error(
           "Expected to compact logs, but could not the compaction bound from the snapshot store",
           error);
       return;
     }
 
-    logger.debug("Scheduling log compaction up to index {}", index);
+    LOGGER.debug("Scheduling log compaction up to index {}", index);
     setCompactableIndex(index);
     compact();
   }
diff --git a/zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/RaftContext.java b/zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/RaftContext.java
index 8264aa2c29e2..0fa0309ebc05 100644
--- a/zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/RaftContext.java
+++ b/zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/RaftContext.java
@@ -28,7 +28,6 @@
 import io.atomix.raft.RaftCommitListener;
 import io.atomix.raft.RaftException.CommitFailedException;
 import io.atomix.raft.RaftRoleChangeListener;
-import io.atomix.raft.RaftServer;
 import io.atomix.raft.RaftServer.Role;
 import io.atomix.raft.RaftThreadContextFactory;
 import io.atomix.raft.SnapshotReplicationListener;
@@ -72,8 +71,6 @@
 import io.atomix.raft.utils.StateUtil;
 import io.atomix.raft.zeebe.EntryValidator;
 import io.atomix.utils.concurrent.ThreadContext;
-import io.atomix.utils.logging.ContextualLoggerFactory;
-import io.atomix.utils.logging.LoggerContext;
 import io.camunda.zeebe.journal.CheckedJournalException.FlushException;
 import io.camunda.zeebe.snapshots.PersistedSnapshot;
 import io.camunda.zeebe.snapshots.ReceivableSnapshotStore;
@@ -97,6 +94,7 @@
 import java.util.function.Consumer;
 import java.util.function.Supplier;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
 
 /**
@@ -108,18 +106,21 @@
  */
 public class RaftContext implements AutoCloseable, HealthMonitorable {
 
+  private static final Logger LOGGER = LoggerFactory.getLogger(RaftContext.class);
+
   /**
    * Configuration index returned when no configuration is available, i.e. configuration is null .
    */
   private static final long NO_CONFIGURATION_INDEX = -1L;
 
+  private static final String RAFT_ROLE_KEY = "raft-role";
+
   protected final String name;
   protected final ThreadContext threadContext;
   protected final ClusterMembershipService membershipService;
   protected final RaftClusterContext cluster;
   protected final RaftServerProtocol protocol;
   protected final RaftStorage storage;
-  private final Logger log;
   private final RaftElectionConfig electionConfig;
   private final Set<RaftRoleChangeListener> roleChangeListeners = new CopyOnWriteArraySet<>();
   private final Set<Consumer<State>> stateChangeListeners = new CopyOnWriteArraySet<>();
@@ -192,12 +193,9 @@ public RaftContext(
 
     raftRoleMetrics = new RaftRoleMetrics(name, meterRegistry);
 
-    log =
-        ContextualLoggerFactory.getLogger(
-            getClass(), LoggerContext.builder(RaftServer.class).addValue(name).build());
     this.electionConfig = electionConfig;
     if (electionConfig.isPriorityElectionEnabled()) {
-      log.debug(
+      LOGGER.debug(
           "Priority election is enabled with target priority {} and node priority {}",
           electionConfig.getInitialTargetPriority(),
           electionConfig.getNodePriority());
@@ -240,16 +238,14 @@ public RaftContext(
         raftLog.getFirstIndex(),
         raftLog.isEmpty(),
         raftLog::reset,
-        log);
+        LOGGER);
 
     logCompactor =
         new LogCompactor(
             threadContext,
             raftLog,
             partitionConfig.getPreferSnapshotReplicationThreshold(),
-            new RaftServiceMetrics(name, meterRegistry),
-            ContextualLoggerFactory.getLogger(
-                LogCompactor.class, LoggerContext.builder(getClass()).addValue(name).build()));
+            new RaftServiceMetrics(name, meterRegistry));
 
     snapshotChunkSize = partitionConfig.getSnapshotChunkSize();
 
@@ -268,7 +264,7 @@ public RaftContext(
       setCommitIndex(meta.commitIndex());
     }
 
-    log.debug(
+    LOGGER.debug(
         "Server started with term={}, lastVotedFor={}, lastFlushedIndex={}, commitIndex={}",
         term,
         lastVotedFor,
@@ -299,7 +295,7 @@ private ThreadContext createThreadContext(
       final String localMemberId) {
     final var context =
         threadContextFactory.createContext(
-            namedThreads("%s-%s-%d".formatted(name, localMemberId, partitionId), log),
+            namedThreads("%s-%s-%d".formatted(name, localMemberId, partitionId), LOGGER),
             this::onUncaughtException);
     // in order to set the partition id once in the raft thread
     context.execute(
@@ -307,6 +303,7 @@ private ThreadContext createThreadContext(
           MDC.put("partitionId", String.valueOf(partitionId));
           MDC.put("actor-name", name + "-" + partitionId);
           MDC.put("actor-scheduler", "Broker-" + localMemberId);
+          MDC.put(RAFT_ROLE_KEY, Role.INACTIVE.name());
         });
     return context;
   }
@@ -316,12 +313,12 @@ private void onNewPersistedSnapshot(final PersistedSnapshot persistedSnapshot) {
   }
 
   private void onUncaughtException(final Throwable error) {
-    log.error("An uncaught exception occurred, transition to inactive role", error);
+    LOGGER.error("An uncaught exception occurred, transition to inactive role", error);
     try {
       // to prevent further operations submitted to the threadcontext to execute
       transition(Role.INACTIVE);
     } catch (final Exception e) {
-      log.error("An error occurred when transitioning to inactive, closing the raft context", e);
+      LOGGER.error("An error occurred when transitioning to inactive, closing the raft context", e);
       close();
     }
 
@@ -338,7 +335,7 @@ private void notifyFailureListeners(final Throwable error) {
         failureListeners.forEach((l) -> l.onFailure(health));
       }
     } catch (final Exception e) {
-      log.error("Could not notify failure listeners", e);
+      LOGGER.error("Could not notify failure listeners", e);
     }
   }
 
@@ -415,7 +412,7 @@ CompletableFuture<R> handleRequestOnContext(
                     error -> {
                       final R response =
                           responseBuilder.get().withStatus(Status.ERROR).withError(error).build();
-                      log.trace("Sending {}", response);
+                      LOGGER.trace("Sending {}", response);
                       future.complete(response);
                     }));
 
@@ -558,8 +555,8 @@ public long setCommitIndex(final long commitIndex) {
         try {
           raftLog.flush();
         } catch (final FlushException e) {
-          if (log.isWarnEnabled()) {
-            log.warn(
+          if (LOGGER.isWarnEnabled()) {
+            LOGGER.warn(
                 "Failed to flush commit at index %s, resetting journal to %s and stepping down"
                     .formatted(commitIndex, previousCommitIndex),
                 e);
@@ -707,7 +704,7 @@ public void transition(final Role role) {
       return;
     }
 
-    log.info("Transitioning to {}", role);
+    LOGGER.info("Transitioning to {}", role);
 
     startTransition();
 
@@ -718,6 +715,8 @@ public void transition(final Role role) {
       throw new IllegalStateException("failed to close Raft state", e);
     }
 
+    MDC.put(RAFT_ROLE_KEY, role.name());
+
     // Force state transitions to occur synchronously in order to prevent race conditions.
     try {
       final RaftRole newRole = createRole(role);
@@ -774,7 +773,7 @@ private void notifyRoleChangeListeners() {
     try {
       roleChangeListeners.forEach(l -> l.onNewRole(role.role(), getTerm()));
     } catch (final Exception exception) {
-      log.error("Unexpected error on calling role change listeners.", exception);
+      LOGGER.error("Unexpected error on calling role change listeners.", exception);
     }
   }
 
@@ -859,14 +858,14 @@ public void close() {
     try {
       raftLog.close();
     } catch (final Exception e) {
-      log.error("Failed to close raft log", e);
+      LOGGER.error("Failed to close raft log", e);
     }
 
     // Close the metastore.
     try {
       meta.close();
     } catch (final Exception e) {
-      log.error("Failed to close metastore", e);
+      LOGGER.error("Failed to close metastore", e);
     }
 
     // close thread contexts
@@ -930,7 +929,7 @@ public void setFirstCommitIndex(final long firstCommitIndex) {
         return;
       }
       this.firstCommitIndex = firstCommitIndex;
-      log.info(
+      LOGGER.info(
           "Setting firstCommitIndex to {}. RaftServer is ready only after it has committed events up to this index",
           firstCommitIndex);
     }
@@ -985,9 +984,9 @@ public void setLastVotedFor(final MemberId candidate) {
     meta.storeVote(lastVotedFor);
 
     if (candidate != null) {
-      log.debug("Voted for {}", candidate);
+      LOGGER.debug("Voted for {}", candidate);
     } else {
-      log.trace("Reset last voted for");
+      LOGGER.trace("Reset last voted for");
     }
   }
 
@@ -1141,7 +1140,7 @@ public void setTerm(final long term) {
       lastVotedFor = null;
       meta.storeTerm(this.term);
       meta.storeVote(lastVotedFor);
-      log.debug("Set term {}", term);
+      LOGGER.debug("Set term {}", term);
     }
   }
 
@@ -1181,12 +1180,12 @@ public void setLeader(final MemberId leader) {
         final DefaultRaftMember member = cluster.getMember(leader);
         if (member != null) {
           this.leader = leader;
-          log.info("Found leader {}", member.memberId());
+          LOGGER.info("Found leader {}", member.memberId());
           electionListeners.forEach(l -> l.accept(member));
         }
       }
 
-      log.trace("Set leader {}", this.leader);
+      LOGGER.trace("Set leader {}", this.leader);
     }
   }
 
@@ -1199,7 +1198,7 @@ public void updateCurrentSnapshot() {
     // Get the latest snapshot from snapshot store because it might have been updated already before
     // this listener is executed
     currentSnapshot = persistedSnapshotStore.getLatestSnapshot().orElse(null);
-    log.trace("Set currentSnapshot to {}", currentSnapshot);
+    LOGGER.trace("Set currentSnapshot to {}", currentSnapshot);
     logCompactor.compactFromSnapshots(persistedSnapshotStore);
   }
 
@@ -1314,14 +1313,14 @@ private enum MissedSnapshotReplicationEvents {
 
   /** Commit listener is active only until the server is ready */
   final class AwaitingReadyCommitListener implements RaftCommitListener {
-    private final Logger throttledLogger = new ThrottledLogger(log, Duration.ofSeconds(30));
+    private final Logger throttledLogger = new ThrottledLogger(LOGGER, Duration.ofSeconds(30));
 
     @Override
     public void onCommit(final long index) {
       // On start up, set the state to READY after the follower has caught up with the leader
       // https://github.com/zeebe-io/zeebe/issues/4877
       if (index >= firstCommitIndex) {
-        log.info("Commit index is {}. RaftServer is ready", index);
+        LOGGER.info("Commit index is {}. RaftServer is ready", index);
         updateState(State.READY);
         awaitingReadyCommitListener = null;
       } else {
diff --git a/zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/ReconfigurationHelper.java b/zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/ReconfigurationHelper.java
index d566e09ed963..3f6cdcbb6627 100644
--- a/zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/ReconfigurationHelper.java
+++ b/zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/ReconfigurationHelper.java
@@ -12,7 +12,6 @@
 import io.atomix.cluster.messaging.MessagingException.NoSuchMemberException;
 import io.atomix.raft.RaftError;
 import io.atomix.raft.RaftException.ProtocolException;
-import io.atomix.raft.RaftServer;
 import io.atomix.raft.RaftServer.Role;
 import io.atomix.raft.cluster.RaftMember;
 import io.atomix.raft.cluster.RaftMember.Type;
@@ -26,8 +25,6 @@
 import io.atomix.raft.storage.system.Configuration;
 import io.atomix.raft.utils.ForceConfigureQuorum;
 import io.atomix.utils.concurrent.ThreadContext;
-import io.atomix.utils.logging.ContextualLoggerFactory;
-import io.atomix.utils.logging.LoggerContext;
 import java.net.ConnectException;
 import java.time.Instant;
 import java.util.Collection;
@@ -42,20 +39,17 @@
 import java.util.function.Consumer;
 import java.util.stream.Collectors;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public final class ReconfigurationHelper {
+  private static final Logger LOGGER = LoggerFactory.getLogger(ReconfigurationHelper.class);
 
   private final ThreadContext threadContext;
   private final RaftContext raftContext;
-  private final Logger logger;
 
   public ReconfigurationHelper(final RaftContext raftContext) {
     threadContext = raftContext.getThreadContext();
     this.raftContext = raftContext;
-    logger =
-        ContextualLoggerFactory.getLogger(
-            getClass(),
-            LoggerContext.builder(RaftServer.class).addValue(raftContext.getName()).build());
   }
 
   public CompletableFuture<Void> join(final Collection<MemberId> clusterMembers) {
@@ -116,22 +110,22 @@ private void joinWithRetry(
                     || cause instanceof NoRemoteHandler
                     || cause instanceof TimeoutException
                     || cause instanceof ConnectException) {
-                  logger.debug("Join request was not acknowledged, retrying", cause);
+                  LOGGER.debug("Join request was not acknowledged, retrying", cause);
                   threadContext.execute(() -> joinWithRetry(joining, assistingMembers, result));
                 } else {
-                  logger.error("Join request failed with an unexpected error, not retrying", error);
+                  LOGGER.error("Join request failed with an unexpected error, not retrying", error);
                   result.completeExceptionally(error);
                 }
               } else if (response.status() == Status.OK) {
-                logger.debug("Join request accepted");
+                LOGGER.debug("Join request accepted");
                 result.complete(null);
               } else if (response.error().type() == RaftError.Type.NO_LEADER
                   || response.error().type() == RaftError.Type.UNAVAILABLE) {
-                logger.debug("Join request failed, retrying", response.error().createException());
+                LOGGER.debug("Join request failed, retrying", response.error().createException());
                 threadContext.execute(() -> joinWithRetry(joining, assistingMembers, result));
               } else {
                 final var errorAsException = response.error().createException();
-                logger.error("Join request rejected, not retrying", errorAsException);
+                LOGGER.error("Join request rejected, not retrying", errorAsException);
                 result.completeExceptionally(errorAsException);
               }
             },
@@ -245,7 +239,7 @@ private void triggerForceConfigure(
         raftContext.transition(Role.FOLLOWER);
       }
 
-      logger.info(
+      LOGGER.info(
           "Current configuration is '{}'. Forcing configuration with members '{}'",
           currentConfiguration,
           newMembers);
@@ -318,7 +312,7 @@ private void sendForceConfigurationRequest(
       final MemberId memberId,
       final ForceConfigureRequest request,
       final ForceConfigureQuorum quorum) {
-    logger.trace("Sending '{}' request to member '{}'", request, memberId);
+    LOGGER.trace("Sending '{}' request to member '{}'", request, memberId);
 
     raftContext
         .getProtocol()
@@ -326,14 +320,14 @@ private void sendForceConfigurationRequest(
         .whenCompleteAsync(
             (response, error) -> {
               if (error != null) {
-                logger.warn(
+                LOGGER.warn(
                     "Failed to send force configure request to member '{}'", memberId, error);
                 quorum.fail(memberId);
               } else if (response.status() == Status.OK) {
-                logger.debug("Successfully sent force configure request to member '{}'", memberId);
+                LOGGER.debug("Successfully sent force configure request to member '{}'", memberId);
                 quorum.succeed(memberId);
               } else {
-                logger.warn(
+                LOGGER.warn(
                     "Failed to send force configure request to member '{}': {}",
                     memberId,
                     response.error());
diff --git a/zeebe/atomix/cluster/src/main/java/io/atomix/raft/partition/impl/RaftPartitionServer.java b/zeebe/atomix/cluster/src/main/java/io/atomix/raft/partition/impl/RaftPartitionServer.java
index 898fccc96449..d6318e91deaf 100644
--- a/zeebe/atomix/cluster/src/main/java/io/atomix/raft/partition/impl/RaftPartitionServer.java
+++ b/zeebe/atomix/cluster/src/main/java/io/atomix/raft/partition/impl/RaftPartitionServer.java
@@ -38,8 +38,6 @@
 import io.atomix.raft.storage.RaftStorage;
 import io.atomix.raft.storage.log.RaftLogReader;
 import io.atomix.raft.zeebe.ZeebeLogAppender;
-import io.atomix.utils.logging.ContextualLoggerFactory;
-import io.atomix.utils.logging.LoggerContext;
 import io.atomix.utils.serializer.Serializer;
 import io.camunda.zeebe.snapshots.PersistedSnapshotStore;
 import io.camunda.zeebe.snapshots.ReceivableSnapshotStore;
@@ -56,11 +54,11 @@
 import java.util.Optional;
 import java.util.concurrent.CompletableFuture;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /** {@link Partition} server. */
 public class RaftPartitionServer implements HealthMonitorable {
-
-  private final Logger log;
+  private static final Logger LOGGER = LoggerFactory.getLogger(RaftPartitionServer.class);
 
   private final MemberId localMemberId;
   private final RaftPartition partition;
@@ -91,10 +89,6 @@ public RaftPartitionServer(
     this.membershipService = membershipService;
     this.clusterCommunicator = clusterCommunicator;
     this.meterRegistry = meterRegistry;
-    log =
-        ContextualLoggerFactory.getLogger(
-            getClass(),
-            LoggerContext.builder(RaftPartitionServer.class).addValue(partition.name()).build());
     this.persistedSnapshotStore = persistedSnapshotStore;
     this.partitionMetadata = partitionMetadata;
     requestTimeout = config.getRequestTimeout();
@@ -106,7 +100,7 @@ public RaftPartitionServer(
   public CompletableFuture<RaftPartitionServer> bootstrap() {
     final RaftStartupMetrics raftStartupMetrics =
         new RaftStartupMetrics(partition.name(), meterRegistry);
-    log.info("Server bootstrapping partition {}", partition.id());
+    LOGGER.info("Server bootstrapping partition {}", partition.id());
     final long bootstrapStartTime = System.currentTimeMillis();
     return server
         .bootstrap(partition.members())
@@ -115,12 +109,12 @@ public CompletableFuture<RaftPartitionServer> bootstrap() {
               if (e == null) {
                 final long endTime = System.currentTimeMillis();
                 raftStartupMetrics.observeBootstrapDuration(endTime - bootstrapStartTime);
-                log.info(
+                LOGGER.info(
                     "Server successfully bootstrapped partition {} in {}ms",
                     partition.id(),
                     endTime - bootstrapStartTime);
               } else {
-                log.warn("Server bootstrap failed for partition {}", partition.id(), e);
+                LOGGER.warn("Server bootstrap failed for partition {}", partition.id(), e);
               }
             })
         .thenApply(v -> this);
@@ -129,7 +123,7 @@ public CompletableFuture<RaftPartitionServer> bootstrap() {
   public CompletableFuture<RaftPartitionServer> join() {
     final var metrics = new RaftStartupMetrics(partition.name(), meterRegistry);
     final long joinStartTime = System.currentTimeMillis();
-    log.info("Server joining partition {}", partition.id());
+    LOGGER.info("Server joining partition {}", partition.id());
     return server
         .join(partitionMetadata.members())
         .whenComplete(
@@ -137,12 +131,12 @@ public CompletableFuture<RaftPartitionServer> join() {
               if (e == null) {
                 final long endTime = System.currentTimeMillis();
                 metrics.observeJoinDuration(endTime - joinStartTime);
-                log.info(
+                LOGGER.info(
                     "Server successfully joined partition {} in {}ms",
                     partition.id(),
                     endTime - joinStartTime);
               } else {
-                log.warn("Server join failed for partition {}", partition.id(), e);
+                LOGGER.warn("Server join failed for partition {}", partition.id(), e);
               }
             })
         .thenApply(v -> this);
@@ -279,7 +273,7 @@ public void delete() {
     try {
       FileUtil.deleteFolderIfExists(partition.dataDirectory().toPath());
     } catch (final IOException e) {
-      log.error("Failed to delete partition: {}", partition, e);
+      LOGGER.error("Failed to delete partition: {}", partition, e);
     }
   }
 
diff --git a/zeebe/atomix/cluster/src/main/java/io/atomix/raft/roles/AbstractRole.java b/zeebe/atomix/cluster/src/main/java/io/atomix/raft/roles/AbstractRole.java
index bcbfd1be5754..98366d025da5 100644
--- a/zeebe/atomix/cluster/src/main/java/io/atomix/raft/roles/AbstractRole.java
+++ b/zeebe/atomix/cluster/src/main/java/io/atomix/raft/roles/AbstractRole.java
@@ -22,17 +22,15 @@
 import io.atomix.raft.RaftError;
 import io.atomix.raft.RaftError.Type;
 import io.atomix.raft.RaftException;
-import io.atomix.raft.RaftServer;
 import io.atomix.raft.cluster.impl.DefaultRaftMember;
 import io.atomix.raft.impl.RaftContext;
 import io.atomix.raft.protocol.RaftRequest;
 import io.atomix.raft.protocol.RaftResponse;
-import io.atomix.utils.logging.ContextualLoggerFactory;
-import io.atomix.utils.logging.LoggerContext;
 import io.camunda.zeebe.util.Either;
 import java.util.concurrent.CompletableFuture;
 import java.util.function.BiFunction;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /** Abstract state. */
 public abstract class AbstractRole implements RaftRole {
@@ -43,13 +41,7 @@ public abstract class AbstractRole implements RaftRole {
 
   protected AbstractRole(final RaftContext raft) {
     this.raft = raft;
-    log =
-        ContextualLoggerFactory.getLogger(
-            getClass(),
-            LoggerContext.builder(RaftServer.class)
-                .addValue(raft.getName())
-                .add("role", role())
-                .build());
+    log = LoggerFactory.getLogger(getClass());
   }
 
   @Override
diff --git a/zeebe/atomix/cluster/src/main/java/io/atomix/raft/roles/LeaderAppender.java b/zeebe/atomix/cluster/src/main/java/io/atomix/raft/roles/LeaderAppender.java
index 2f1c7a2b8ba8..f76d33c17bd8 100644
--- a/zeebe/atomix/cluster/src/main/java/io/atomix/raft/roles/LeaderAppender.java
+++ b/zeebe/atomix/cluster/src/main/java/io/atomix/raft/roles/LeaderAppender.java
@@ -39,8 +39,6 @@
 import io.atomix.raft.protocol.VersionedAppendRequest;
 import io.atomix.raft.snapshot.impl.SnapshotChunkImpl;
 import io.atomix.raft.storage.log.IndexedRaftLogEntry;
-import io.atomix.utils.logging.ContextualLoggerFactory;
-import io.atomix.utils.logging.LoggerContext;
 import io.camunda.zeebe.snapshots.PersistedSnapshot;
 import io.camunda.zeebe.snapshots.SnapshotChunk;
 import io.camunda.zeebe.snapshots.SnapshotChunkReader;
@@ -56,6 +54,7 @@
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.TimeoutException;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The leader appender is responsible for sending {@link AppendRequest}s on behalf of a leader to
@@ -63,10 +62,10 @@
  */
 final class LeaderAppender {
 
+  private static final Logger LOGGER = LoggerFactory.getLogger(LeaderAppender.class);
   private static final int MIN_BACKOFF_FAILURE_COUNT = 5;
 
   private final int maxBatchSizePerAppend;
-  private final Logger log;
   private final RaftContext raft;
   private boolean open = true;
 
@@ -82,9 +81,6 @@ final class LeaderAppender {
 
   LeaderAppender(final LeaderRole leader) {
     raft = checkNotNull(leader.raft, "context cannot be null");
-    log =
-        ContextualLoggerFactory.getLogger(
-            getClass(), LoggerContext.builder(RaftServer.class).addValue(raft.getName()).build());
     metrics = new LeaderAppenderMetrics(raft.getName(), raft.getMeterRegistry());
     maxBatchSizePerAppend = raft.getMaxAppendBatchSize();
     leaderTime = System.currentTimeMillis();
@@ -210,7 +206,7 @@ private void sendAppendRequest(
 
     final long timestamp = System.currentTimeMillis();
 
-    log.trace("Sending {} to {}", request, member.getMember().memberId());
+    LOGGER.trace("Sending {} to {}", request, member.getMember().memberId());
     raft.getProtocol()
         .append(member.getMember().memberId(), request)
         .whenCompleteAsync(
@@ -226,7 +222,7 @@ private void sendAppendRequest(
                 }
 
                 if (error == null) {
-                  log.trace("Received {} from {}", response, member.getMember().memberId());
+                  LOGGER.trace("Received {} from {}", response, member.getMember().memberId());
                   handleAppendResponse(member, request, response, timestamp);
                 } else {
                   handleAppendResponseFailure(member, request, error);
@@ -274,7 +270,7 @@ private void updateMatchIndex(final RaftMemberContext member, final AppendRespon
   /** Resets the match index when a response fails. */
   private void resetMatchIndex(final RaftMemberContext member, final AppendResponse response) {
     if (response.lastLogIndex() < member.getMatchIndex()) {
-      log.trace("Reset match index for {} to {}", member, member.getMatchIndex());
+      LOGGER.trace("Reset match index for {} to {}", member, member.getMatchIndex());
       member.setMatchIndex(response.lastLogIndex());
       observeRemainingMemberEntries(member);
     }
@@ -293,7 +289,7 @@ private void resetNextIndex(final RaftMemberContext member, final AppendResponse
 
   private void resetNextIndex(final RaftMemberContext member, final long nextIndex) {
     member.reset(nextIndex);
-    log.trace("Reset next index for {} to {}", member, nextIndex);
+    LOGGER.trace("Reset next index for {} to {}", member, nextIndex);
   }
 
   /** Resets the snapshot index of the member when a response fails. */
@@ -301,7 +297,7 @@ private void resetSnapshotIndex(final RaftMemberContext member, final AppendResp
     final long snapshotIndex = response.lastSnapshotIndex();
     if (member.getSnapshotIndex() != snapshotIndex) {
       member.setSnapshotIndex(snapshotIndex);
-      log.trace("Reset snapshot index for {} to {}", member, snapshotIndex);
+      LOGGER.trace("Reset snapshot index for {} to {}", member, snapshotIndex);
     }
   }
 
@@ -322,14 +318,14 @@ private ConfigureRequest buildConfigureRequest() {
   /** Connects to the member and sends a configure request. */
   private void sendConfigureRequest(
       final RaftMemberContext member, final ConfigureRequest request) {
-    log.debug("Configuring {} : {}", member.getMember().memberId(), request);
+    LOGGER.debug("Configuring {} : {}", member.getMember().memberId(), request);
 
     // Start the configure to the member.
     member.startConfigure();
 
     final long timestamp = System.currentTimeMillis();
 
-    log.trace("Sending {} to {}", request, member.getMember().memberId());
+    LOGGER.trace("Sending {} to {}", request, member.getMember().memberId());
     raft.getProtocol()
         .configure(member.getMember().memberId(), request)
         .whenCompleteAsync(
@@ -339,13 +335,13 @@ private void sendConfigureRequest(
                 member.completeConfigure();
 
                 if (error == null) {
-                  log.trace("Received {} from {}", response, member.getMember().memberId());
+                  LOGGER.trace("Received {} from {}", response, member.getMember().memberId());
                   handleConfigureResponse(member, request, response, timestamp);
                 } else {
-                  if (log.isTraceEnabled()) {
-                    log.debug("Failed to configure {}", member.getMember().memberId(), error);
+                  if (LOGGER.isTraceEnabled()) {
+                    LOGGER.debug("Failed to configure {}", member.getMember().memberId(), error);
                   } else {
-                    log.debug("Failed to configure {}", member.getMember().memberId());
+                    LOGGER.debug("Failed to configure {}", member.getMember().memberId());
                   }
                   handleConfigureResponseFailure(member, request, error);
                 }
@@ -387,7 +383,7 @@ private Optional<InstallRequest> buildInstallRequest(
         final SnapshotChunkReader snapshotChunkReader = persistedSnapshot.newChunkReader();
         member.setSnapshotChunkReader(snapshotChunkReader);
       } catch (final UncheckedIOException e) {
-        log.warn(
+        LOGGER.warn(
             "Expected to send Snapshot {} to {}. But could not open SnapshotChunkReader. Will retry.",
             persistedSnapshot.getId(),
             member,
@@ -436,7 +432,7 @@ private Optional<InstallRequest> buildInstallRequest(
               .build();
       return Optional.of(request);
     } catch (final UncheckedIOException e) {
-      log.warn(
+      LOGGER.warn(
           "Expected to send next chunk of Snapshot {} to {}. But could not read SnapshotChunk. Snapshot may have been deleted. Will retry.",
           persistedSnapshot.getId(),
           member.getMember().memberId(),
@@ -455,7 +451,7 @@ private void sendInstallRequest(final RaftMemberContext member, final InstallReq
 
     final long timestamp = System.currentTimeMillis();
 
-    log.trace("Sending {} to {}", request, member.getMember().memberId());
+    LOGGER.trace("Sending {} to {}", request, member.getMember().memberId());
     raft.getProtocol()
         .install(member.getMember().memberId(), request)
         .whenCompleteAsync(
@@ -465,7 +461,7 @@ private void sendInstallRequest(final RaftMemberContext member, final InstallReq
                 member.completeInstall();
 
                 if (error == null) {
-                  log.trace("Received {} from {}", response, member.getMember().memberId());
+                  LOGGER.trace("Received {} from {}", response, member.getMember().memberId());
                   handleInstallResponse(member, request, response, timestamp);
                 } else {
                   // Trigger reactions to the install response failure.
@@ -529,7 +525,7 @@ private void handleInstallResponseError(
       final RaftMemberContext member,
       final InstallRequest request,
       final InstallResponse response) {
-    log.warn(
+    LOGGER.warn(
         "Failed to send {} to member {}, with {}. Restart sending snapshot.",
         request,
         member.getMember().memberId(),
@@ -648,7 +644,7 @@ private void failAttempt(
     // when attempting to send entries to down followers.
     final int failures = member.incrementFailureCount();
     if (failures <= 3 || failures % 100 == 0) {
-      log.warn("{} to {} failed", request, member.getMember().memberId(), error);
+      LOGGER.warn("{} to {} failed", request, member.getMember().memberId(), error);
     }
 
     // Fail heartbeat futures.
@@ -663,7 +659,7 @@ private void failAttempt(
         System.currentTimeMillis() - Math.max(computeResponseTime(), leaderTime);
     if (member.getFailureCount() >= minStepDownFailureCount
         && quorumResponseTime > maxQuorumResponseTimeout) {
-      log.warn(
+      LOGGER.warn(
           "Suspected network partition after {} failures from {} over a period of time {} > {}, stepping down",
           member.getFailureCount(),
           member.getMember().memberId(),
@@ -714,7 +710,7 @@ private void handleAppendResponseOk(
     }
     // If we've received a greater term, update the term and transition back to follower.
     else if (response.term() > raft.getTerm()) {
-      log.info(
+      LOGGER.info(
           "Received successful append response higher term ({} > {}) from {}, implying there is a new leader - transitioning to follower",
           response.term(),
           raft.getTerm(),
@@ -808,7 +804,7 @@ private void handleAppendResponseError(
       final AppendResponse response) {
     // If we've received a greater term, update the term and transition back to follower.
     if (response.term() > raft.getTerm()) {
-      log.info(
+      LOGGER.info(
           "Received error append response with higher term ({} > {}) from {}, implying there is a new leader, transitioning to follower",
           response.term(),
           raft.getTerm(),
@@ -826,7 +822,7 @@ private void handleAppendResponseError(
       // when attempting to send entries to down followers.
       final int failures = member.incrementFailureCount();
       if (failures <= 3 || failures % 100 == 0) {
-        log.warn(
+        LOGGER.warn(
             "{} to {} failed: {}",
             request,
             member.getMember().memberId(),
@@ -910,7 +906,7 @@ private boolean shouldReplicateSnapshot(final RaftMemberContext member) {
 
   private void replicateSnapshot(final RaftMemberContext member) {
     final var persistedSnapshot = raft.getCurrentSnapshot();
-    log.debug(
+    LOGGER.debug(
         "Replicating snapshot {} to {}",
         persistedSnapshot.getIndex(),
         member.getMember().memberId());
@@ -1025,7 +1021,7 @@ private void commitEntries() {
     if (commitIndex > 0
         && commitIndex > previousCommitIndex
         && (leaderIndex > 0 && commitIndex >= leaderIndex)) {
-      log.trace("Committed entries up to {}", commitIndex);
+      LOGGER.trace("Committed entries up to {}", commitIndex);
       raft.setCommitIndex(commitIndex);
       completeCommits(commitIndex);
     }
diff --git a/zeebe/atomix/cluster/src/test/java/io/atomix/raft/impl/LogCompactorTest.java b/zeebe/atomix/cluster/src/test/java/io/atomix/raft/impl/LogCompactorTest.java
index 68780dcaf65c..0d701c6cd37d 100644
--- a/zeebe/atomix/cluster/src/test/java/io/atomix/raft/impl/LogCompactorTest.java
+++ b/zeebe/atomix/cluster/src/test/java/io/atomix/raft/impl/LogCompactorTest.java
@@ -26,7 +26,6 @@
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.MethodSource;
 import org.mockito.Mockito;
-import org.slf4j.LoggerFactory;
 
 final class LogCompactorTest {
   private ThreadContext threadContext;
@@ -48,12 +47,7 @@ void beforeEach() {
         .execute(Mockito.any());
 
     compactor =
-        new LogCompactor(
-            threadContext,
-            raftLog,
-            5,
-            new RaftServiceMetrics("1", meterRegistry),
-            LoggerFactory.getLogger(getClass()));
+        new LogCompactor(threadContext, raftLog, 5, new RaftServiceMetrics("1", meterRegistry));
   }
 
   @Test
diff --git a/zeebe/atomix/utils/pom.xml b/zeebe/atomix/utils/pom.xml
index 5482f2a0fae3..1e19b86f098c 100644
--- a/zeebe/atomix/utils/pom.xml
+++ b/zeebe/atomix/utils/pom.xml
@@ -56,11 +56,6 @@
       <artifactId>objenesis</artifactId>
     </dependency>
 
-    <dependency>
-      <groupId>com.google.errorprone</groupId>
-      <artifactId>error_prone_annotations</artifactId>
-    </dependency>
-
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
diff --git a/zeebe/atomix/utils/src/main/java/io/atomix/utils/logging/ContextualLogger.java b/zeebe/atomix/utils/src/main/java/io/atomix/utils/logging/ContextualLogger.java
deleted file mode 100644
index 96f0847fd430..000000000000
--- a/zeebe/atomix/utils/src/main/java/io/atomix/utils/logging/ContextualLogger.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/*
- * Copyright 2017-present Open Networking Foundation
- * Copyright © 2020 camunda services GmbH (info@camunda.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.atomix.utils.logging;
-
-import org.slf4j.Logger;
-import org.slf4j.Marker;
-
-/** Contextual logger. */
-public class ContextualLogger implements Logger {
-  private static final String SEPARATOR = " - ";
-  private final LoggerContext context;
-  private final Logger delegate;
-
-  public ContextualLogger(final Logger delegate, final LoggerContext context) {
-    this.delegate = delegate;
-    this.context = context;
-  }
-
-  /**
-   * Returns a contextualized version of the given string.
-   *
-   * @param msg the message to contextualize
-   * @return the contextualized message
-   */
-  private String contextualize(final String msg) {
-    return context + SEPARATOR + msg;
-  }
-
-  @Override
-  public String getName() {
-    return delegate.getName();
-  }
-
-  @Override
-  public boolean isTraceEnabled() {
-    return delegate.isTraceEnabled();
-  }
-
-  @Override
-  public void trace(final String msg) {
-    if (isTraceEnabled()) {
-      delegate.trace(contextualize(msg));
-    }
-  }
-
-  @Override
-  public void trace(final String format, final Object arg) {
-    if (isTraceEnabled()) {
-      delegate.trace(contextualize(format), arg);
-    }
-  }
-
-  @Override
-  public void trace(final String format, final Object arg1, final Object arg2) {
-    if (isTraceEnabled()) {
-      delegate.trace(contextualize(format), arg1, arg2);
-    }
-  }
-
-  @Override
-  public void trace(final String format, final Object... arguments) {
-    if (isTraceEnabled()) {
-      delegate.trace(contextualize(format), arguments);
-    }
-  }
-
-  @Override
-  public void trace(final String msg, final Throwable t) {
-    if (isTraceEnabled()) {
-      delegate.trace(contextualize(msg), t);
-    }
-  }
-
-  @Override
-  public boolean isTraceEnabled(final Marker marker) {
-    return delegate.isTraceEnabled(marker);
-  }
-
-  @Override
-  public void trace(final Marker marker, final String msg) {
-    if (isTraceEnabled()) {
-      delegate.trace(marker, contextualize(msg));
-    }
-  }
-
-  @Override
-  public void trace(final Marker marker, final String format, final Object arg) {
-    if (isTraceEnabled()) {
-      delegate.trace(marker, contextualize(format), arg);
-    }
-  }
-
-  @Override
-  public void trace(
-      final Marker marker, final String format, final Object arg1, final Object arg2) {
-    if (isTraceEnabled()) {
-      delegate.trace(marker, contextualize(format), arg1, arg2);
-    }
-  }
-
-  @Override
-  public void trace(final Marker marker, final String format, final Object... argArray) {
-    if (isTraceEnabled()) {
-      delegate.trace(marker, contextualize(format), argArray);
-    }
-  }
-
-  @Override
-  public void trace(final Marker marker, final String msg, final Throwable t) {
-    if (isTraceEnabled()) {
-      delegate.trace(marker, contextualize(msg), t);
-    }
-  }
-
-  @Override
-  public boolean isDebugEnabled() {
-    return delegate.isDebugEnabled();
-  }
-
-  @Override
-  public void debug(final String msg) {
-    if (isDebugEnabled()) {
-      delegate.debug(contextualize(msg));
-    }
-  }
-
-  @Override
-  public void debug(final String format, final Object arg) {
-    if (isDebugEnabled()) {
-      delegate.debug(contextualize(format), arg);
-    }
-  }
-
-  @Override
-  public void debug(final String format, final Object arg1, final Object arg2) {
-    if (isDebugEnabled()) {
-      delegate.debug(contextualize(format), arg1, arg2);
-    }
-  }
-
-  @Override
-  public void debug(final String format, final Object... arguments) {
-    if (isDebugEnabled()) {
-      delegate.debug(contextualize(format), arguments);
-    }
-  }
-
-  @Override
-  public void debug(final String msg, final Throwable t) {
-    if (isDebugEnabled()) {
-      delegate.debug(contextualize(msg), t);
-    }
-  }
-
-  @Override
-  public boolean isDebugEnabled(final Marker marker) {
-    return delegate.isDebugEnabled(marker);
-  }
-
-  @Override
-  public void debug(final Marker marker, final String msg) {
-    if (isDebugEnabled()) {
-      delegate.debug(marker, contextualize(msg));
-    }
-  }
-
-  @Override
-  public void debug(final Marker marker, final String format, final Object arg) {
-    if (isDebugEnabled()) {
-      delegate.debug(marker, contextualize(format), arg);
-    }
-  }
-
-  @Override
-  public void debug(
-      final Marker marker, final String format, final Object arg1, final Object arg2) {
-    if (isDebugEnabled()) {
-      delegate.debug(marker, contextualize(format), arg1, arg2);
-    }
-  }
-
-  @Override
-  public void debug(final Marker marker, final String format, final Object... arguments) {
-    if (isDebugEnabled()) {
-      delegate.debug(marker, contextualize(format), arguments);
-    }
-  }
-
-  @Override
-  public void debug(final Marker marker, final String msg, final Throwable t) {
-    if (isDebugEnabled()) {
-      delegate.debug(marker, contextualize(msg), t);
-    }
-  }
-
-  @Override
-  public boolean isInfoEnabled() {
-    return delegate.isInfoEnabled();
-  }
-
-  @Override
-  public void info(final String msg) {
-    if (isInfoEnabled()) {
-      delegate.info(contextualize(msg));
-    }
-  }
-
-  @Override
-  public void info(final String format, final Object arg) {
-    if (isInfoEnabled()) {
-      delegate.info(contextualize(format), arg);
-    }
-  }
-
-  @Override
-  public void info(final String format, final Object arg1, final Object arg2) {
-    if (isInfoEnabled()) {
-      delegate.info(contextualize(format), arg1, arg2);
-    }
-  }
-
-  @Override
-  public void info(final String format, final Object... arguments) {
-    if (isInfoEnabled()) {
-      delegate.info(contextualize(format), arguments);
-    }
-  }
-
-  @Override
-  public void info(final String msg, final Throwable t) {
-    if (isInfoEnabled()) {
-      delegate.info(contextualize(msg), t);
-    }
-  }
-
-  @Override
-  public boolean isInfoEnabled(final Marker marker) {
-    return delegate.isInfoEnabled(marker);
-  }
-
-  @Override
-  public void info(final Marker marker, final String msg) {
-    if (isInfoEnabled()) {
-      delegate.info(marker, contextualize(msg));
-    }
-  }
-
-  @Override
-  public void info(final Marker marker, final String format, final Object arg) {
-    if (isInfoEnabled()) {
-      delegate.info(marker, contextualize(format), arg);
-    }
-  }
-
-  @Override
-  public void info(final Marker marker, final String format, final Object arg1, final Object arg2) {
-    if (isInfoEnabled()) {
-      delegate.info(marker, contextualize(format), arg1, arg2);
-    }
-  }
-
-  @Override
-  public void info(final Marker marker, final String format, final Object... arguments) {
-    if (isInfoEnabled()) {
-      delegate.info(marker, contextualize(format), arguments);
-    }
-  }
-
-  @Override
-  public void info(final Marker marker, final String msg, final Throwable t) {
-    if (isInfoEnabled()) {
-      delegate.info(marker, contextualize(msg), t);
-    }
-  }
-
-  @Override
-  public boolean isWarnEnabled() {
-    return delegate.isWarnEnabled();
-  }
-
-  @Override
-  public void warn(final String msg) {
-    if (isWarnEnabled()) {
-      delegate.warn(contextualize(msg));
-    }
-  }
-
-  @Override
-  public void warn(final String format, final Object arg) {
-    if (isWarnEnabled()) {
-      delegate.warn(contextualize(format), arg);
-    }
-  }
-
-  @Override
-  public void warn(final String format, final Object... arguments) {
-    if (isWarnEnabled()) {
-      delegate.warn(contextualize(format), arguments);
-    }
-  }
-
-  @Override
-  public void warn(final String format, final Object arg1, final Object arg2) {
-    if (isWarnEnabled()) {
-      delegate.warn(contextualize(format), arg1, arg2);
-    }
-  }
-
-  @Override
-  public void warn(final String msg, final Throwable t) {
-    if (isWarnEnabled()) {
-      delegate.warn(contextualize(msg), t);
-    }
-  }
-
-  @Override
-  public boolean isWarnEnabled(final Marker marker) {
-    return delegate.isWarnEnabled(marker);
-  }
-
-  @Override
-  public void warn(final Marker marker, final String msg) {
-    if (isWarnEnabled()) {
-      delegate.warn(marker, contextualize(msg));
-    }
-  }
-
-  @Override
-  public void warn(final Marker marker, final String format, final Object arg) {
-    if (isWarnEnabled()) {
-      delegate.warn(marker, contextualize(format), arg);
-    }
-  }
-
-  @Override
-  public void warn(final Marker marker, final String format, final Object arg1, final Object arg2) {
-    if (isWarnEnabled()) {
-      delegate.warn(marker, contextualize(format), arg1, arg2);
-    }
-  }
-
-  @Override
-  public void warn(final Marker marker, final String format, final Object... arguments) {
-    if (isWarnEnabled()) {
-      delegate.warn(marker, contextualize(format), arguments);
-    }
-  }
-
-  @Override
-  public void warn(final Marker marker, final String msg, final Throwable t) {
-    if (isWarnEnabled()) {
-      delegate.warn(marker, contextualize(msg), t);
-    }
-  }
-
-  @Override
-  public boolean isErrorEnabled() {
-    return delegate.isErrorEnabled();
-  }
-
-  @Override
-  public void error(final String msg) {
-    if (isErrorEnabled()) {
-      delegate.error(contextualize(msg));
-    }
-  }
-
-  @Override
-  public void error(final String format, final Object arg) {
-    if (isErrorEnabled()) {
-      delegate.error(contextualize(format), arg);
-    }
-  }
-
-  @Override
-  public void error(final String format, final Object arg1, final Object arg2) {
-    if (isErrorEnabled()) {
-      delegate.error(contextualize(format), arg1, arg2);
-    }
-  }
-
-  @Override
-  public void error(final String format, final Object... arguments) {
-    if (isErrorEnabled()) {
-      delegate.error(contextualize(format), arguments);
-    }
-  }
-
-  @Override
-  public void error(final String msg, final Throwable t) {
-    if (isErrorEnabled()) {
-      delegate.error(contextualize(msg), t);
-    }
-  }
-
-  @Override
-  public boolean isErrorEnabled(final Marker marker) {
-    return delegate.isWarnEnabled(marker);
-  }
-
-  @Override
-  public void error(final Marker marker, final String msg) {
-    if (isErrorEnabled()) {
-      delegate.error(marker, contextualize(msg));
-    }
-  }
-
-  @Override
-  public void error(final Marker marker, final String format, final Object arg) {
-    if (isErrorEnabled()) {
-      delegate.error(marker, contextualize(format), arg);
-    }
-  }
-
-  @Override
-  public void error(
-      final Marker marker, final String format, final Object arg1, final Object arg2) {
-    if (isErrorEnabled()) {
-      delegate.error(marker, contextualize(format), arg1, arg2);
-    }
-  }
-
-  @Override
-  public void error(final Marker marker, final String format, final Object... arguments) {
-    if (isErrorEnabled()) {
-      delegate.error(marker, contextualize(format), arguments);
-    }
-  }
-
-  @Override
-  public void error(final Marker marker, final String msg, final Throwable t) {
-    if (isErrorEnabled()) {
-      delegate.error(marker, contextualize(msg), t);
-    }
-  }
-}
diff --git a/zeebe/atomix/utils/src/main/java/io/atomix/utils/logging/ContextualLoggerFactory.java b/zeebe/atomix/utils/src/main/java/io/atomix/utils/logging/ContextualLoggerFactory.java
deleted file mode 100644
index 60345b1ce3e0..000000000000
--- a/zeebe/atomix/utils/src/main/java/io/atomix/utils/logging/ContextualLoggerFactory.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2017-present Open Networking Foundation
- * Copyright © 2020 camunda services GmbH (info@camunda.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.atomix.utils.logging;
-
-import org.slf4j.LoggerFactory;
-
-/** Contextual logger factory. */
-public final class ContextualLoggerFactory {
-
-  private ContextualLoggerFactory() {}
-
-  /**
-   * Returns a contextual logger.
-   *
-   * @param name the contextual logger name
-   * @param context the logger context
-   * @return the logger
-   */
-  public static ContextualLogger getLogger(final String name, final LoggerContext context) {
-    return new ContextualLogger(LoggerFactory.getLogger(name), context);
-  }
-
-  /**
-   * Returns a contextual logger.
-   *
-   * @param clazz the contextual logger class
-   * @param context the logger context
-   * @return the logger
-   */
-  public static ContextualLogger getLogger(final Class clazz, final LoggerContext context) {
-    return new ContextualLogger(LoggerFactory.getLogger(clazz), context);
-  }
-}
diff --git a/zeebe/atomix/utils/src/main/java/io/atomix/utils/logging/LoggerContext.java b/zeebe/atomix/utils/src/main/java/io/atomix/utils/logging/LoggerContext.java
deleted file mode 100644
index bb8e0a8ddb22..000000000000
--- a/zeebe/atomix/utils/src/main/java/io/atomix/utils/logging/LoggerContext.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * Copyright 2017-present Open Networking Foundation
- * Copyright © 2020 camunda services GmbH (info@camunda.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.atomix.utils.logging;
-
-import com.google.common.base.MoreObjects;
-import com.google.errorprone.annotations.CanIgnoreReturnValue;
-import java.util.function.Supplier;
-
-/** Logger context. */
-public class LoggerContext {
-
-  private final Supplier<String> stringProvider;
-
-  public LoggerContext(final Supplier<String> stringProvider) {
-    this.stringProvider = stringProvider;
-  }
-
-  /**
-   * Returns a new contextual logger builder.
-   *
-   * @param name the logger name
-   * @return the logger builder
-   */
-  public static Builder builder(final String name) {
-    return new Builder(name);
-  }
-
-  /**
-   * Returns a new contextual logger builder.
-   *
-   * @param clazz the logger class
-   * @return the logger builder
-   */
-  public static Builder builder(final Class clazz) {
-    return new Builder(clazz.getSimpleName());
-  }
-
-  @Override
-  public String toString() {
-    return stringProvider.get();
-  }
-
-  /** Contextual logger builder. */
-  public static class Builder implements io.atomix.utils.Builder<LoggerContext> {
-    private final MoreObjects.ToStringHelper identityStringHelper;
-    private MoreObjects.ToStringHelper argsStringHelper;
-    private final boolean omitNullValues = false;
-
-    public Builder(final String name) {
-      identityStringHelper = MoreObjects.toStringHelper(name);
-    }
-
-    /** Initializes the arguments string helper. */
-    private void initializeArgs() {
-      if (argsStringHelper == null) {
-        argsStringHelper = MoreObjects.toStringHelper("");
-      }
-    }
-
-    /**
-     * Adds a name/value pair to the formatted output in {@code name=value} format. If {@code value}
-     * is {@code null}, the string {@code "null"} is used.
-     */
-    @CanIgnoreReturnValue
-    public Builder add(final String name, final Object value) {
-      initializeArgs();
-      argsStringHelper.add(name, value);
-      return this;
-    }
-
-    /** Adds a name/value pair to the formatted output in {@code name=value} format. */
-    @CanIgnoreReturnValue
-    public Builder add(final String name, final boolean value) {
-      initializeArgs();
-      argsStringHelper.add(name, value);
-      return this;
-    }
-
-    /** Adds a name/value pair to the formatted output in {@code name=value} format. */
-    @CanIgnoreReturnValue
-    public Builder add(final String name, final char value) {
-      initializeArgs();
-      argsStringHelper.add(name, value);
-      return this;
-    }
-
-    /** Adds a name/value pair to the formatted output in {@code name=value} format. */
-    @CanIgnoreReturnValue
-    public Builder add(final String name, final double value) {
-      initializeArgs();
-      argsStringHelper.add(name, value);
-      return this;
-    }
-
-    /** Adds a name/value pair to the formatted output in {@code name=value} format. */
-    @CanIgnoreReturnValue
-    public Builder add(final String name, final float value) {
-      initializeArgs();
-      argsStringHelper.add(name, value);
-      return this;
-    }
-
-    /** Adds a name/value pair to the formatted output in {@code name=value} format. */
-    @CanIgnoreReturnValue
-    public Builder add(final String name, final int value) {
-      initializeArgs();
-      argsStringHelper.add(name, value);
-      return this;
-    }
-
-    /** Adds a name/value pair to the formatted output in {@code name=value} format. */
-    @CanIgnoreReturnValue
-    public Builder add(final String name, final long value) {
-      initializeArgs();
-      argsStringHelper.add(name, value);
-      return this;
-    }
-
-    /**
-     * Adds an unnamed value to the formatted output.
-     *
-     * <p>It is strongly encouraged to use {@link #add(String, Object)} instead and give value a
-     * readable name.
-     */
-    @CanIgnoreReturnValue
-    public Builder addValue(final Object value) {
-      identityStringHelper.addValue(value);
-      return this;
-    }
-
-    /**
-     * Adds an unnamed value to the formatted output.
-     *
-     * <p>It is strongly encouraged to use {@link #add(String, boolean)} instead and give value a
-     * readable name.
-     */
-    @CanIgnoreReturnValue
-    public Builder addValue(final boolean value) {
-      identityStringHelper.addValue(value);
-      return this;
-    }
-
-    /**
-     * Adds an unnamed value to the formatted output.
-     *
-     * <p>It is strongly encouraged to use {@link #add(String, char)} instead and give value a
-     * readable name.
-     */
-    @CanIgnoreReturnValue
-    public Builder addValue(final char value) {
-      identityStringHelper.addValue(value);
-      return this;
-    }
-
-    /**
-     * Adds an unnamed value to the formatted output.
-     *
-     * <p>It is strongly encouraged to use {@link #add(String, double)} instead and give value a
-     * readable name.
-     */
-    @CanIgnoreReturnValue
-    public Builder addValue(final double value) {
-      identityStringHelper.addValue(value);
-      return this;
-    }
-
-    /**
-     * Adds an unnamed value to the formatted output.
-     *
-     * <p>It is strongly encouraged to use {@link #add(String, float)} instead and give value a
-     * readable name.
-     */
-    @CanIgnoreReturnValue
-    public Builder addValue(final float value) {
-      identityStringHelper.addValue(value);
-      return this;
-    }
-
-    /**
-     * Adds an unnamed value to the formatted output.
-     *
-     * <p>It is strongly encouraged to use {@link #add(String, int)} instead and give value a
-     * readable name.
-     */
-    @CanIgnoreReturnValue
-    public Builder addValue(final int value) {
-      identityStringHelper.addValue(value);
-      return this;
-    }
-
-    /**
-     * Adds an unnamed value to the formatted output.
-     *
-     * <p>It is strongly encouraged to use {@link #add(String, long)} instead and give value a
-     * readable name.
-     */
-    @CanIgnoreReturnValue
-    public Builder addValue(final long value) {
-      identityStringHelper.addValue(value);
-      return this;
-    }
-
-    @Override
-    public LoggerContext build() {
-      final MoreObjects.ToStringHelper identityStringHelper = this.identityStringHelper;
-      final MoreObjects.ToStringHelper argsStringHelper = this.argsStringHelper;
-      if (omitNullValues) {
-        identityStringHelper.omitNullValues();
-        if (argsStringHelper != null) {
-          argsStringHelper.omitNullValues();
-        }
-      }
-      return new LoggerContext(
-          () -> {
-            if (argsStringHelper == null) {
-              return identityStringHelper.toString();
-            } else {
-              return identityStringHelper.toString() + argsStringHelper.toString();
-            }
-          });
-    }
-  }
-}
diff --git a/zeebe/atomix/utils/src/main/java/io/atomix/utils/logging/package-info.java b/zeebe/atomix/utils/src/main/java/io/atomix/utils/logging/package-info.java
deleted file mode 100644
index af5566cb5c58..000000000000
--- a/zeebe/atomix/utils/src/main/java/io/atomix/utils/logging/package-info.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright 2018-present Open Networking Foundation
- * Copyright © 2020 camunda services GmbH (info@camunda.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/** Provides utility classes for logging in complex objects. */
-package io.atomix.utils.logging;
diff --git a/zeebe/atomix/utils/src/test/java/io/atomix/utils/logging/LoggerContextTest.java b/zeebe/atomix/utils/src/test/java/io/atomix/utils/logging/LoggerContextTest.java
deleted file mode 100644
index cd6d2dbc960e..000000000000
--- a/zeebe/atomix/utils/src/test/java/io/atomix/utils/logging/LoggerContextTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2017-present Open Networking Foundation
- * Copyright © 2020 camunda services GmbH (info@camunda.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.atomix.utils.logging;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-
-/** Contextual logger test. */
-public class LoggerContextTest {
-  @Test
-  public void testLoggerContext() throws Exception {
-    final LoggerContext context =
-        LoggerContext.builder("test").addValue(1).add("foo", "bar").build();
-    assertEquals("test{1}{foo=bar}", context.toString());
-  }
-}
diff --git a/zeebe/broker/src/test/java/io/camunda/zeebe/broker/backup/ConcurrentBackupCompactionTest.java b/zeebe/broker/src/test/java/io/camunda/zeebe/broker/backup/ConcurrentBackupCompactionTest.java
index 5aded74a88eb..48a1d05b6016 100644
--- a/zeebe/broker/src/test/java/io/camunda/zeebe/broker/backup/ConcurrentBackupCompactionTest.java
+++ b/zeebe/broker/src/test/java/io/camunda/zeebe/broker/backup/ConcurrentBackupCompactionTest.java
@@ -55,13 +55,10 @@
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
 import org.mockito.stubbing.Answer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 @ExtendWith(MockitoExtension.class)
 public class ConcurrentBackupCompactionTest extends DynamicAutoCloseable {
 
-  private static final Logger LOG = LoggerFactory.getLogger(ConcurrentBackupCompactionTest.class);
   private static final String SNAPSHOT_FILE_NAME = "file1";
   @TempDir Path dataDirectory;
   @AutoClose MeterRegistry meterRegistry = new SimpleMeterRegistry();
@@ -102,7 +99,7 @@ void setUp() {
                 .withMetaStore(mock(JournalMetaStore.class))
                 .withMaxSegmentSize(128)
                 .build());
-    logCompactor = new LogCompactor(threadContext, raftLog, 3, raftMetrics, LOG);
+    logCompactor = new LogCompactor(threadContext, raftLog, 3, raftMetrics);
 
     // raftLog just calls journal in the real implementation
     when(raftLog.deleteUntil(anyLong()))


Reviews:
user: login: lenaschoenburg
body: Looks good to me :+1: 

Regarding backporting, perhaps we can just let @backport-action do its thing and just give up if there's actual conflicts :shrug: 
state: APPROVED
author_association: MEMBER
submitted_at: 2025-03-18T16:00:46Z
user: login: npepinpe
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-18T17:44:19Z
user: login: lenaschoenburg
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-18T17:45:11Z

Review comments:
diff_hunk: @@ -46,20 +45,16 @@
  * @see RaftStorage
  */
 public class DefaultRaftServer implements RaftServer {
+  private static final Logger LOGGER = LoggerFactory.getLogger(DefaultRaftServer.class);
path: zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/DefaultRaftServer.java
user: login: lenaschoenburg
body: :upside_down_face: I know we usually use the actual class but aesthetically, I'd prefer to use `RaftServer.class` like before.
created_at: 2025-03-18T15:54:31Z
author_association: MEMBER
diff_hunk: @@ -46,20 +45,16 @@
  * @see RaftStorage
  */
 public class DefaultRaftServer implements RaftServer {
+  private static final Logger LOGGER = LoggerFactory.getLogger(DefaultRaftServer.class);
path: zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/DefaultRaftServer.java
user: login: npepinpe
body: Interesting, I get a warning if I do this :smile: (Logger instantiated with foreign class).
created_at: 2025-03-18T17:44:19Z
author_association: MEMBER
diff_hunk: @@ -46,20 +45,16 @@
  * @see RaftStorage
  */
 public class DefaultRaftServer implements RaftServer {
+  private static final Logger LOGGER = LoggerFactory.getLogger(DefaultRaftServer.class);
path: zeebe/atomix/cluster/src/main/java/io/atomix/raft/impl/DefaultRaftServer.java
user: login: lenaschoenburg
body: Eh I guess that's fair :shrug: 
created_at: 2025-03-18T17:45:11Z
author_association: MEMBER

PR comments:
user: login: npepinpe
created_at: 2025-03-16T20:17:26Z
body: I'm on the fence about backporting - on one hand, it's low risk, and it brings some value. On the other hand, it's not really that necessary, and we don't often change this kind of code.
author_association: MEMBER
user: login: npepinpe
created_at: 2025-03-17T08:21:45Z
body: @lenaschoenburg some formatting issues, but nothing stopping a review I think 😅 I'll fix them later when I find some time
author_association: MEMBER
user: login: backport-action
created_at: 2025-03-18T18:26:23Z
body: Created backport PR for `stable/8.7`:
- #29783 with remaining conflicts!

Please cherry-pick the changes locally and resolve any conflicts.
```bash
git fetch origin backport-29647-to-stable/8.7
git worktree add --checkout .worktree/backport-29647-to-stable/8.7 backport-29647-to-stable/8.7
cd .worktree/backport-29647-to-stable/8.7
git reset --hard HEAD^
git cherry-pick -x 3f43aeddc2fc335ac70f1bae9bca7de1f53859ab 84117f7948cca87090cbcdc66590dd4fc67bd520 6beb5375c0627acda9f146e84c339e35222465f1
git push --force-with-lease
```
author_association: COLLABORATOR