From 57ba8eb0196c11f9497abf03f544578aa4cb0403 Mon Sep 17 00:00:00 2001 From: carbotaniuman <41451839+carbotaniuman@users.noreply.github.com> Date: Sat, 13 Jun 2020 17:46:18 -0500 Subject: [PATCH] Spotless + different log output --- CHANGELOG.md | 1 + src/main/java/mdnet/base/settings/WebSettings.java | 4 +--- src/main/kotlin/mdnet/base/Netty.kt | 7 +++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 180db38..cc48c5f 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [2020-06-13] Modified AsyncAppender queue size to 1024 by [@lflare]. - [2020-06-13] Bumped client version to 5 by [@lflare]. - [2020-06-13] Modularized the image server [@carbotaniuman]. +- [2020-06-13] Suppressed log output for IOException [@carbotaniuman]. ## [1.0.0-RC14] - 2020-06-12 ### Fixed diff --git a/src/main/java/mdnet/base/settings/WebSettings.java b/src/main/java/mdnet/base/settings/WebSettings.java index 51edb51..b5cfa2c 100644 --- a/src/main/java/mdnet/base/settings/WebSettings.java +++ b/src/main/java/mdnet/base/settings/WebSettings.java @@ -20,8 +20,6 @@ public final class WebSettings { @Override public String toString() { - return "WebSettings{" + - "uiPort=" + uiPort + - '}'; + return "WebSettings{" + "uiPort=" + uiPort + '}'; } } diff --git a/src/main/kotlin/mdnet/base/Netty.kt b/src/main/kotlin/mdnet/base/Netty.kt index a235032..9d02c77 100644 --- a/src/main/kotlin/mdnet/base/Netty.kt +++ b/src/main/kotlin/mdnet/base/Netty.kt @@ -85,9 +85,12 @@ class Netty(private val tls: ServerSettings.TlsCert, private val clientSettings: if (LOGGER.isTraceEnabled) { LOGGER.trace("Ignored invalid SSL connection") } - } else if (cause is IOException && cause.message?.contains("peer") == true) { + } else if (cause is IOException) { + if (LOGGER.isInfoEnabled) { + LOGGER.info("User (downloader) abruptly closed the connection") + } if (LOGGER.isTraceEnabled) { - LOGGER.trace("User (downloader) closed the connection") + LOGGER.trace("IOException in pipeline", cause) } } else { ctx.fireExceptionCaught(cause)