mirror of
https://github.com/InsanusMokrassar/KSLog.git
synced 2024-12-22 22:17:15 +00:00
KSLog with iterable
This commit is contained in:
parent
2b79b6d060
commit
63b29d3665
@ -3,6 +3,7 @@
|
|||||||
## 0.0.2
|
## 0.0.2
|
||||||
|
|
||||||
* New logger `TagLogger` and now extension `Any#logger` will use it to decrease objects allocations
|
* New logger `TagLogger` and now extension `Any#logger` will use it to decrease objects allocations
|
||||||
|
* Now it is possible to create `KSLog` using any iterable
|
||||||
|
|
||||||
## 0.0.1
|
## 0.0.1
|
||||||
|
|
||||||
|
@ -44,10 +44,13 @@ expect fun KSLog(
|
|||||||
|
|
||||||
fun KSLog(
|
fun KSLog(
|
||||||
defaultTag: String,
|
defaultTag: String,
|
||||||
levels: Set<LogLevel>
|
levels: Iterable<LogLevel>
|
||||||
): KSLog = KSLog (defaultTag) { l, _, _, _ ->
|
): KSLog {
|
||||||
|
val levels = levels.toSet()
|
||||||
|
return KSLog (defaultTag) { l, _, _, _ ->
|
||||||
l in levels
|
l in levels
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun KSLog(
|
fun KSLog(
|
||||||
defaultTag: String,
|
defaultTag: String,
|
||||||
|
Loading…
Reference in New Issue
Block a user