Skip to content

Enable Debug Logging for Master and Coordination Packages #46363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this won't give us the desired logging, as the logger is non-static and the specific subclasses of TransportMasterNodeAction are in a different package

Copy link
Contributor Author

@original-brownbear original-brownbear Sep 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make it static and live with the change in classname in the log lines? (we get that information from logged exceptions and the fact that we include the action name in the debug logging anyway?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a temporary change, yes. As a more permanent change, I'm not so sure (need to think about it more).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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