KSLog(SimpleKSLogCallback)

This commit is contained in:
InsanusMokrassar 2022-07-31 19:09:01 +06:00
parent 0e01534562
commit 3ff5d989b7
2 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,7 @@
* Add `setDefaultKSLog` * Add `setDefaultKSLog`
* Add `plus` operation for two `KSLog` instances to call them both on each log performing * Add `plus` operation for two `KSLog` instances to call them both on each log performing
* Add `KSLog` factory for simple creation of `CallbackKSLog`
## 0.4.1 ## 0.4.1

View File

@ -7,3 +7,7 @@ class CallbackKSLog(
) : KSLog { ) : KSLog {
override fun performLog(level: LogLevel, tag: String?, message: Any, throwable: Throwable?) = performLogCallback(level, tag, message, throwable) override fun performLog(level: LogLevel, tag: String?, message: Any, throwable: Throwable?) = performLogCallback(level, tag, message, throwable)
} }
fun KSLog(
performLogCallback: SimpleKSLogCallback
) = CallbackKSLog(performLogCallback)