From 16836ce535d4cd2bf517ea28444174c724efa03b Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Mon, 13 Jan 2020 18:31:11 +0100 Subject: [PATCH] omit package name while logging --- .../info/nightscout/androidaps/logging/AAPSLoggerProduction.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/logging/AAPSLoggerProduction.kt b/app/src/main/java/info/nightscout/androidaps/logging/AAPSLoggerProduction.kt index eba38c3dc4..a4db515dde 100644 --- a/app/src/main/java/info/nightscout/androidaps/logging/AAPSLoggerProduction.kt +++ b/app/src/main/java/info/nightscout/androidaps/logging/AAPSLoggerProduction.kt @@ -58,7 +58,7 @@ class AAPSLoggerProduction : AAPSLogger { } } -fun StackTraceElement.toLogString(): String = "[${this.className}.${this.methodName}():${this.lineNumber}]: " +fun StackTraceElement.toLogString(): String = "[${this.className.substringAfterLast(".")}.${this.methodName}():${this.lineNumber}]: " /* Needs to be inline. Don't remove even if IDE suggests it. */ private inline fun stackLogMarker() = Throwable().stackTrace[1].toLogString() \ No newline at end of file