From 35567bba1d08888395e35835cfd9f4da7de5f29e Mon Sep 17 00:00:00 2001 From: carbotaniuman Date: Thu, 27 Aug 2020 14:23:24 +0000 Subject: [PATCH] Change logging and update spotless --- build.gradle | 2 +- src/main/kotlin/mdnet/base/server/ImageServer.kt | 4 ---- src/main/resources/logback.xml | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index dfdfeb1..854ceca 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { id "org.jetbrains.kotlin.kapt" version "1.4.0" id "application" id "com.github.johnrengelman.shadow" version "5.2.0" - id "com.diffplug.gradle.spotless" version "4.4.0" + id "com.diffplug.spotless" version "5.2.0" id "dev.afanasev.sekret" version "0.0.7" } diff --git a/src/main/kotlin/mdnet/base/server/ImageServer.kt b/src/main/kotlin/mdnet/base/server/ImageServer.kt index 94323b5..77333ad 100644 --- a/src/main/kotlin/mdnet/base/server/ImageServer.kt +++ b/src/main/kotlin/mdnet/base/server/ImageServer.kt @@ -121,11 +121,9 @@ class ImageServer( } ) } catch (e: JsonProcessingException) { - println(e) LOGGER.info(e) { "Request for $sanitizedUri rejected for invalid token" } return@then Response(Status.FORBIDDEN) } - println(token) if (OffsetDateTime.now().isAfter(token.expires)) { LOGGER.info { "Request for $sanitizedUri rejected for expired token" } @@ -276,11 +274,9 @@ class ImageServer( if (editor.getLength(0) == contentLength.toLong()) { LOGGER.info { "Cache download for $sanitizedUri committed" } editor.commit() - println("A") cache.flush() } else { LOGGER.warn { "Cache download for $sanitizedUri aborted" } - println("B") editor.abort() } } catch (e: Exception) { diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index dd4fccc..126b3d3 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -8,8 +8,8 @@ log/logFile.%d{yyyy-MM-dd_HH}.%i.log 12 - 100MB - 1GB + 32MB + 256MB -->