mirror of
https://github.com/InsanusMokrassar/KSLog.git
synced 2024-12-22 05:57:14 +00:00
Merge branch '1.3.0' (fix of js assert accordance)
This commit is contained in:
commit
b19639e8a1
@ -5,7 +5,7 @@ import kotlin.js.Console
|
|||||||
external interface ExtendedConsole : Console {
|
external interface ExtendedConsole : Console {
|
||||||
fun trace()
|
fun trace()
|
||||||
fun debug(vararg o: Any?)
|
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<ExtendedConsole>().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)
|
* [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<ExtendedConsole>().assert(*args)
|
fun Console.assert(assertion: Boolean, vararg args: Any?) = unsafeCast<ExtendedConsole>().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)
|
* [https://developer.mozilla.org/en-US/docs/Web/API/console/trace_static](https://developer.mozilla.org/en-US/docs/Web/API/console/trace_static)
|
||||||
|
@ -14,6 +14,6 @@ actual var KSLoggerDefaultPlatformLoggerLambda: (level: LogLevel, tag: String, m
|
|||||||
LogLevel.INFO -> console.info(*args)
|
LogLevel.INFO -> console.info(*args)
|
||||||
LogLevel.WARNING -> console.warn(*args)
|
LogLevel.WARNING -> console.warn(*args)
|
||||||
LogLevel.ERROR -> console.error(*args)
|
LogLevel.ERROR -> console.error(*args)
|
||||||
LogLevel.ASSERT -> console.assert(*args)
|
LogLevel.ASSERT -> console.error(*args)
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user