Skip to content
Open
Changes from all 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 @@ -174,7 +174,21 @@ private void doConnect() {
log.debug("Max retries have been reached. Will not attempt again.");
}
} catch (Throwable t) {
log.error("Unable to create StatsD client - {} - Will not retry", statsDAddress(), t);
if (log.isDebugEnabled()) {
// Display full stack traces on debug logs
log.warn("Unable to create StatsD client - {} - Will not retry", statsDAddress(), t);
} else {
// Only report the top and root cause message
Throwable rootCause = t;
while (rootCause.getCause() != null) {
rootCause = rootCause.getCause();
}
log.warn(
"Unable to create StatsD client - {} - Will not retry: {}, {}",
statsDAddress(),
t.getMessage(),
rootCause.getMessage());
}
}
}
}
Expand Down