Skip to content

Commit

Permalink
#98 Turned down log level on ProxyToServerConnection.exceptionCaught()
Browse files Browse the repository at this point in the history
  • Loading branch information
oxtoacart committed Oct 5, 2013
1 parent 47ed95d commit 1cae1e4
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,16 @@ protected void disconnected() {
protected void exceptionCaught(Throwable cause) {
String message = "Caught exception on proxy -> web connection";
int logLevel = LocationAwareLogger.WARN_INT;
if (cause != null && cause.getMessage() != null) {
if (cause.getMessage().contains("Connection reset by peer")) {
logLevel = LocationAwareLogger.DEBUG_INT;
} else if (cause instanceof ConnectException) {
if (cause != null) {
String causeMessage = cause.getMessage();
if (cause instanceof ConnectException) {
logLevel = LocationAwareLogger.DEBUG_INT;
} else if (causeMessage != null) {
if (causeMessage.contains("Connection reset by peer")) {
logLevel = LocationAwareLogger.DEBUG_INT;
} else if (causeMessage.contains("event executor terminated")) {
logLevel = LocationAwareLogger.DEBUG_INT;
}
}
}
LOG.log(logLevel, message, cause);
Expand Down

0 comments on commit 1cae1e4

Please sign in to comment.