Compare commits

...

3 Commits

Author SHA1 Message Date
447e4fe5ac hotfix of js assert accordance 2023-11-18 18:08:19 +06:00
0b7b408b06 update changelog 2023-11-18 17:59:45 +06:00
ea43501a03 migration onto 1.3.0 2023-11-18 17:55:50 +06:00
4 changed files with 8 additions and 5 deletions

View File

@@ -1,6 +1,9 @@
# Changelog
## 1.2.5
## 1.3.0
**THIS UPDATE CONTAINS CHANGES OF LOG LEVELS ACCORDANCES. LOOK AT THE LEVELS ACCORDANCE IN THE [DOCUMENTATION](https://docs.inmo.dev/kslog/logging.html#logging)
FOR MORE INFO**
* Add `trace` logging level
* Change overall table of log level accordance

View File

@@ -10,5 +10,5 @@ org.gradle.jvmargs=-Xmx512m
# Project data
group=dev.inmo
version=1.2.5
version=1.3.0
android_code_version=27

View File

@@ -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<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)
*/
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)

View File

@@ -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)
}
}