From 50b18afd3db8a4935e74242344185afea201bf16 Mon Sep 17 00:00:00 2001 From: Vincent Del Mundo <60253966+vincentdelmundo@users.noreply.github.com> Date: Thu, 4 Aug 2022 11:21:29 +0900 Subject: [PATCH] fix: revert logger to single parameter (SDKCF-5737) --- README.md | 3 +++ .../com/rakuten/tech/mobile/sdkutils/logger/Logger.kt | 8 +++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f75bb20..913a876 100644 --- a/README.md +++ b/README.md @@ -225,6 +225,9 @@ val retrofit = Retrofit.Builder().build("your_baseUrl", okHttpClient gsonConvert ## Changelog +### v2.1.1 (2022-08-04) +* SDKCF-5737: Reverted `Logger` constructor to single parameter. + ### v2.1.0 (2022-08-02) * SDKCF-5307: Added version string resource which can be referenced by the name `sdk_utils__version`. * SDKCF-4921: Added support for building with Java 11. diff --git a/sdk-utils/src/main/kotlin/com/rakuten/tech/mobile/sdkutils/logger/Logger.kt b/sdk-utils/src/main/kotlin/com/rakuten/tech/mobile/sdkutils/logger/Logger.kt index 46bcd4d..dc95b86 100644 --- a/sdk-utils/src/main/kotlin/com/rakuten/tech/mobile/sdkutils/logger/Logger.kt +++ b/sdk-utils/src/main/kotlin/com/rakuten/tech/mobile/sdkutils/logger/Logger.kt @@ -25,8 +25,7 @@ import kotlin.math.min * @param [tag] Optional identifier for the source of a log message. Default value is "". */ @SuppressWarnings("TooManyFunctions", "SpreadOperator") -open class Logger( - private val tag: String = "", +open class Logger(private val tag: String = "") { /** * The level of the stack trace to be logged. @@ -34,9 +33,8 @@ open class Logger( * SDKUtils is implemented in an application). If the logger is used in another SDK * you may need to upgrade it using `loggerInstance.setDebug()` to display the host SDK's logs. */ - private var stackTraceLevel: Int = 5 -) { - + @SuppressWarnings("MagicNumber") + private var stackTraceLevel = 5 private var isDebug = false @SuppressWarnings("LongMethod", "ComplexMethod", "NestedBlockDepth")