diff --git a/src/nativeMain/kotlin/io/github/oshai/kotlinlogging/ConsoleOutputAppender.kt b/src/nativeMain/kotlin/io/github/oshai/kotlinlogging/ConsoleOutputAppender.kt index a51ed3c0..6b7f1bc5 100644 --- a/src/nativeMain/kotlin/io/github/oshai/kotlinlogging/ConsoleOutputAppender.kt +++ b/src/nativeMain/kotlin/io/github/oshai/kotlinlogging/ConsoleOutputAppender.kt @@ -6,7 +6,7 @@ import platform.posix.stderr public object ConsoleOutputAppender : FormattingAppender() { override fun logFormattedMessage(loggingEvent: KLoggingEvent, formattedMessage: Any?) { if (loggingEvent.level == Level.ERROR) { - fprintf(stderr, "$formattedMessage\n") + fprintf(stderr, "%s\n", formattedMessage.toString()) } else { println(formattedMessage) }