Skip to content
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

DEBUG-level logging of org.elasticsearch.action by default seems excessive #51198

Closed
DaveCTurner opened this issue Jan 19, 2020 · 3 comments
Closed
Labels
:Core/Infra/Core Core issues without another label

Comments

@DaveCTurner
Copy link
Contributor

DaveCTurner commented Jan 19, 2020

In 2bb31fe (v0.6.0!) we added DEBUG-level logging to the default config of the action logger "for easier debugging". This lives on to this day in the default config and results in a good deal of log noise sometimes. For instance, an exception thrown in an implementation of TransportMasterNodeAction#masterOperation results in a retry or else it is propagated back to the caller but is also logged at DEBUG level, complete with stack trace, by TransportMasterNodeAction on the way past:

ActionListener<Response> delegate = ActionListener.delegateResponse(listener, (delegatedListener, t) -> {
if (t instanceof FailedToCommitClusterStateException || t instanceof NotMasterException) {
logger.debug(() -> new ParameterizedMessage("master could not publish cluster state or " +
"stepped down before publishing action [{}], scheduling a retry", actionName), t);
retry(t, masterChangePredicate);
} else {
logger.debug("unexpected exception during publication", t);
delegatedListener.onFailure(t);
}
});
threadPool.executor(executor)
.execute(ActionRunnable.wrap(delegate, l -> masterOperation(task, request, clusterState, l)));

It seems odd to single out this one package for DEBUG-level logs; these days many actions are in other packages (e.g. within org.elasticsearch.xpack.*). Do we still see value in this being part of the out-of-the-box default config? I think we should move to not emitting any DEBUG-level logs by default.

@DaveCTurner DaveCTurner added discuss :Core/Infra/Core Core issues without another label labels Jan 19, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Core)

@DaveCTurner DaveCTurner changed the title DEBUG-level logging of org.elasticsearch.action seems excessive DEBUG-level logging of org.elasticsearch.action by default seems excessive Jan 19, 2020
@nik9000
Copy link
Member

nik9000 commented Jan 20, 2020

I think we should move to not emitting any DEBUG-level logs by default.

+1. I think that is what DEBUG is supposed to mean. When I first saw these were on years ago I thought it was a temporary thing. Then I forgot about it.

DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this issue Jan 26, 2020
In 2bb31fe (v0.6.0!) we added DEBUG-level logging to the default config of
action loggers "for easier debugging". This change to the default config lives
on to this day. It does not obviously make debugging any easier any more, but
it does result in a good deal of log noise sometimes. This commit removes this
special case from the default config.

Closes elastic#51198
@DaveCTurner
Copy link
Contributor Author

Seeing no objections, I opened #51459

DaveCTurner added a commit that referenced this issue Jan 27, 2020
In 2bb31fe (v0.6.0!) we added DEBUG-level logging to the default config of
action loggers "for easier debugging". This change to the default config lives
on to this day. It does not obviously make debugging any easier any more, but
it does result in a good deal of log noise sometimes. This commit removes this
special case from the default config.

Closes #51198
rjernst added a commit to rjernst/elasticsearch that referenced this issue May 29, 2020
In elastic#51459 DEBUG-level logging was removed from the default log4j
configuration. However, our docker build has its own log4j configuration
which was missed in that change. This commit removes the same from the
docker log4j configuration.

relates elastic#51459
relates elastic#51198
rjernst added a commit that referenced this issue Jun 2, 2020
In #51459 DEBUG-level logging was removed from the default log4j
configuration. However, our docker build has its own log4j configuration
which was missed in that change. This commit removes the same from the
docker log4j configuration.

relates #51459
relates #51198
rjernst added a commit that referenced this issue Jun 2, 2020
In #51459 DEBUG-level logging was removed from the default log4j
configuration. However, our docker build has its own log4j configuration
which was missed in that change. This commit removes the same from the
docker log4j configuration.

relates #51459
relates #51198
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label
Projects
None yet
Development

No branches or pull requests

3 participants