From bfe1c881807f986c98a8d90a4a1f4d709d580bd9 Mon Sep 17 00:00:00 2001 From: Bernhard Schandl Date: Wed, 29 Nov 2017 20:22:15 +0100 Subject: [PATCH] Reduce logging level (#16) --- src/main/java/com/ecwid/maleorang/MailchimpClient.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/ecwid/maleorang/MailchimpClient.kt b/src/main/java/com/ecwid/maleorang/MailchimpClient.kt index 1e5338d..936dd40 100644 --- a/src/main/java/com/ecwid/maleorang/MailchimpClient.kt +++ b/src/main/java/com/ecwid/maleorang/MailchimpClient.kt @@ -35,24 +35,24 @@ open class MailchimpClient protected constructor ( val methodInfo = MailchimpMethodInfo(method) val request = Connector.Request(methodInfo.httpMethod.name, methodInfo.buildUrl(apiKey), "ignorable", apiKey, methodInfo.requestBody) - if (log.isLoggable(Level.INFO)) { + if (log.isLoggable(Level.FINEST)) { val sb = StringBuilder("Request: ") sb.append(request.method).append(' ').append(request.url) if (request.requestBody != null) { sb.append('\n').append("Body: ").append(request.requestBody) } - log.info(sb.toString()) + log.finest(sb.toString()) } val response = connector.call(request) - if (log.isLoggable(Level.INFO)) { + if (log.isLoggable(Level.FINEST)) { val sb = StringBuilder("Response: ") sb.append(response.statusCode).append(' ').append(response.reasonPhrase) if (response.responseBody != null) { sb.append('\n').append("Body: ").append(response.responseBody) } - log.info(sb.toString()) + log.finest(sb.toString()) } if (response.statusCode !in 200..299) {