diff --git a/buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java b/buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java index b5a04969687..c1baadaf0e2 100644 --- a/buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java +++ b/buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java @@ -912,6 +912,10 @@ public class ElasticsearchNode implements TestClusterConfiguration { // Don't wait for state, just start up quickly. This will also allow new and old nodes in the BWC case to become the master defaultConfig.put("discovery.initial_state_timeout", "0s"); + // TODO: Remove these once https://github.com/elastic/elasticsearch/issues/46091 is fixed + defaultConfig.put("logger.org.elasticsearch.action.support.master", "DEBUG"); + defaultConfig.put("logger.org.elasticsearch.cluster.coordination", "DEBUG"); + HashSet overriden = new HashSet<>(defaultConfig.keySet()); overriden.retainAll(settings.keySet()); overriden.removeAll(OVERRIDABLE_SETTINGS); diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/TransportClusterRerouteAction.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/TransportClusterRerouteAction.java index 1d231b6ea84..d3a94201813 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/TransportClusterRerouteAction.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/TransportClusterRerouteAction.java @@ -19,6 +19,7 @@ package org.elasticsearch.action.admin.cluster.reroute; +import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; import org.elasticsearch.ExceptionsHelper; @@ -58,6 +59,8 @@ import java.util.Map; public class TransportClusterRerouteAction extends TransportMasterNodeAction { + private static final Logger logger = LogManager.getLogger(TransportClusterRerouteAction.class); + private final AllocationService allocationService; @Inject diff --git a/server/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeAction.java b/server/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeAction.java index c6ea2a23205..6704bcc4384 100644 --- a/server/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeAction.java +++ b/server/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeAction.java @@ -19,6 +19,8 @@ package org.elasticsearch.action.support.master; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionListenerResponseHandler; @@ -56,6 +58,8 @@ import java.util.function.Predicate; public abstract class TransportMasterNodeAction, Response extends ActionResponse> extends HandledTransportAction { + protected static final Logger logger = LogManager.getLogger(TransportMasterNodeAction.class); + protected final ThreadPool threadPool; protected final TransportService transportService; protected final ClusterService clusterService;