Skip to content

Commit

Permalink
Enable Debug Logging for Master and Coordination Packages (#46363) (#…
Browse files Browse the repository at this point in the history
…46374)

In order to track down #46091:
* Enables debug logging in REST tests for `master` and `coordination` packages
since we suspect that issues are caused by failed and then retried publications
  • Loading branch information
original-brownbear authored Sep 5, 2019
1 parent 5201386 commit 7a9af87
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,10 @@ private void createConfiguration() {
// 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<String> overriden = new HashSet<>(defaultConfig.keySet());
overriden.retainAll(settings.keySet());
overriden.removeAll(OVERRIDABLE_SETTINGS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -58,6 +59,8 @@

public class TransportClusterRerouteAction extends TransportMasterNodeAction<ClusterRerouteRequest, ClusterRerouteResponse> {

private static final Logger logger = LogManager.getLogger(TransportClusterRerouteAction.class);

private final AllocationService allocationService;

@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -56,6 +58,8 @@
public abstract class TransportMasterNodeAction<Request extends MasterNodeRequest<Request>, Response extends ActionResponse>
extends HandledTransportAction<Request, Response> {

protected static final Logger logger = LogManager.getLogger(TransportMasterNodeAction.class);

protected final ThreadPool threadPool;
protected final TransportService transportService;
protected final ClusterService clusterService;
Expand Down

0 comments on commit 7a9af87

Please sign in to comment.