From 07a08554329d06a954e54a985e2103f6cb38e21a Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Sun, 12 Aug 2018 10:46:53 +0300 Subject: [PATCH] Timeout message address + debug log instead of warn --- .../djrapitops/plan/system/info/connection/ConnectionOut.java | 2 +- .../plan/system/info/connection/WebExceptionLogger.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Plan/src/main/java/com/djrapitops/plan/system/info/connection/ConnectionOut.java b/Plan/src/main/java/com/djrapitops/plan/system/info/connection/ConnectionOut.java index ae015fc30..ca2b9fbe3 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/info/connection/ConnectionOut.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/info/connection/ConnectionOut.java @@ -92,7 +92,7 @@ public class ConnectionOut { handleResult(url, parameters, responseCode); } catch (SocketTimeoutException e) { ConnectionLog.logConnectionTo(toServer, infoRequest, 0); - throw new ConnectionFailException("Connection timed out after 10 seconds.", e); + throw new ConnectionFailException("Connection to " + address + " timed out after 10 seconds.", e); } catch (NoSuchAlgorithmException | KeyStoreException | KeyManagementException | IOException e) { if (Settings.DEV_MODE.isTrue()) { Log.warn("THIS ERROR IS ONLY LOGGED IN DEV MODE:"); diff --git a/Plan/src/main/java/com/djrapitops/plan/system/info/connection/WebExceptionLogger.java b/Plan/src/main/java/com/djrapitops/plan/system/info/connection/WebExceptionLogger.java index a2beaba59..49e14bad7 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/info/connection/WebExceptionLogger.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/info/connection/WebExceptionLogger.java @@ -25,11 +25,11 @@ public class WebExceptionLogger { function.apply(); } catch (ConnectionFailException e) { if (shouldLog(e)) { - Log.warn(e.getMessage()); + Log.debug(e.getMessage()); } } catch (UnsupportedTransferDatabaseException | UnauthorizedServerException | NotFoundException | NoServersException e) { - Log.warn(e.getMessage()); + Log.debug(e.getMessage()); } catch (WebException e) { Log.toLog(c, e); }