diff --git a/src/jsMain/kotlin/ExtendedConsole.kt b/src/jsMain/kotlin/ExtendedConsole.kt index e486dc6..25864c7 100644 --- a/src/jsMain/kotlin/ExtendedConsole.kt +++ b/src/jsMain/kotlin/ExtendedConsole.kt @@ -5,7 +5,7 @@ import kotlin.js.Console external interface ExtendedConsole : Console { fun trace() fun debug(vararg o: Any?) - fun assert(vararg o: Any?) + fun assert(assertion: Boolean, vararg o: Any?) } /** @@ -16,7 +16,7 @@ fun Console.debug(vararg args: Any?) = unsafeCast().debug(*args /** * [https://developer.mozilla.org/en-US/docs/Web/APtraceI/console/assert_static](https://developer.mozilla.org/en-US/docs/Web/API/console/assert_static) */ -fun Console.assert(vararg args: Any?) = unsafeCast().assert(*args) +fun Console.assert(assertion: Boolean, vararg args: Any?) = unsafeCast().assert(assertion, *args) /** * [https://developer.mozilla.org/en-US/docs/Web/API/console/trace_static](https://developer.mozilla.org/en-US/docs/Web/API/console/trace_static) diff --git a/src/jsMain/kotlin/KSLoggerDefaultPlatformLoggerLambda.kt b/src/jsMain/kotlin/KSLoggerDefaultPlatformLoggerLambda.kt index 3ae1d03..e6fac74 100644 --- a/src/jsMain/kotlin/KSLoggerDefaultPlatformLoggerLambda.kt +++ b/src/jsMain/kotlin/KSLoggerDefaultPlatformLoggerLambda.kt @@ -14,6 +14,6 @@ actual var KSLoggerDefaultPlatformLoggerLambda: (level: LogLevel, tag: String, m LogLevel.INFO -> console.info(*args) LogLevel.WARNING -> console.warn(*args) LogLevel.ERROR -> console.error(*args) - LogLevel.ASSERT -> console.assert(*args) + LogLevel.ASSERT -> console.error(*args) } } \ No newline at end of file