Skip to content

Commit 4366fc3

Browse files
committed
add diagnostics
1 parent 5bc77a0 commit 4366fc3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/nativeMain/kotlin/io/github/oshai/kotlinlogging/internal/KLoggerNameResolver.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ internal actual object KLoggerNameResolver {
2323
// Fallback for top-level loggers: Parse the stack trace string array.
2424
val stackTrace: Array<String> = Throwable().getStackTrace()
2525

26+
// START: Diagnostic code
27+
println("--- KOTLIN-LOGGING DIAGNOSTIC: STACK TRACE ---")
28+
stackTrace.forEach { println(it) }
29+
println("--- END DIAGNOSTIC ---")
30+
// END: Diagnostic code
31+
2632
// Find the first frame outside of the logging framework's internal machinery.
2733
val callerFrame =
2834
stackTrace.firstOrNull {

0 commit comments

Comments
 (0)