Skip to content

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

Closed
@DaveCTurner

Description

@DaveCTurner

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Core/Infra/CoreCore issues without another label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions