Skip to content

Commit

Permalink
Merge pull request elastic#13825 from MaineC/bug-fix/10021-logging-only
Browse files Browse the repository at this point in the history
Add stack traces to logged exceptions where missing
  • Loading branch information
Isabel Drost-Fromm committed Mar 30, 2016
2 parents eed885e + d33197c commit 453ffeb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ private boolean handleBlockExceptions(ClusterState state) {

private void handleBlockException(ClusterBlockException blockException) {
if (blockException.retryable()) {
logger.trace("cluster is blocked ({}), scheduling a retry", blockException.getMessage());
logger.trace("cluster is blocked, scheduling a retry", blockException);
retry(blockException);
} else {
finishAsFailed(blockException);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.elasticsearch.cluster;

import org.elasticsearch.ExceptionsHelper;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.LatchedActionListener;
import org.elasticsearch.action.admin.cluster.node.stats.NodeStats;
Expand Down Expand Up @@ -307,7 +308,7 @@ public void onResponse(NodesStatsResponse nodeStatses) {
@Override
public void onFailure(Throwable e) {
if (e instanceof ReceiveTimeoutTransportException) {
logger.error("NodeStatsAction timed out for ClusterInfoUpdateJob (reason [{}])", e.getMessage());
logger.error("NodeStatsAction timed out for ClusterInfoUpdateJob", e);
} else {
if (e instanceof ClusterBlockException) {
if (logger.isTraceEnabled()) {
Expand Down Expand Up @@ -337,7 +338,7 @@ public void onResponse(IndicesStatsResponse indicesStatsResponse) {
@Override
public void onFailure(Throwable e) {
if (e instanceof ReceiveTimeoutTransportException) {
logger.error("IndicesStatsAction timed out for ClusterInfoUpdateJob (reason [{}])", e.getMessage());
logger.error("IndicesStatsAction timed out for ClusterInfoUpdateJob", e);
} else {
if (e instanceof ClusterBlockException) {
if (logger.isTraceEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public void onFailure(Throwable e) {
if (logger.isTraceEnabled()) {
logger.trace("failed to execute bulk", e);
} else {
logger.warn("failed to execute bulk: [{}]", e.getMessage());
logger.warn("failed to execute bulk: ", e);
}
}
});
Expand Down

0 comments on commit 453ffeb

Please sign in to comment.