Fix caller stack trace depth and update version

Adjusted the caller stack trace depth to accurately capture the caller method. Updated Gradle build version from 1.1.0 to 1.1.1 to reflect the changes. Improved logging level representation by using 'label' instead of 'name'.
This commit is contained in:
2024-10-27 15:35:29 +01:00
parent 1d86216c5d
commit bf4217ea61
3 changed files with 3 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ plugins {
} }
group = "nl.astraeus" group = "nl.astraeus"
version = "1.1.0" version = "1.1.1"
repositories { repositories {
mavenCentral() mavenCentral()

View File

@@ -55,7 +55,7 @@ class Logger(
} }
logEntry.append(timestamp) logEntry.append(timestamp)
logEntry.append(" - ") logEntry.append(" - ")
logEntry.append(level.name) logEntry.append(level.label)
logEntry.append(" - ") logEntry.append(" - ")
if (thread != null) { if (thread != null) {
logEntry.append(thread) logEntry.append(thread)

View File

@@ -6,4 +6,4 @@ actual fun getTimestamp(): String = Date().toString()
actual fun getCurrentThread(): String? = Thread.currentThread().name actual fun getCurrentThread(): String? = Thread.currentThread().name
actual fun getCaller(): String? = Throwable().stackTrace[2].toString() actual fun getCaller(): String? = Throwable().stackTrace[3].toString()