mirror of
https://github.com/InsanusMokrassar/KSLog.git
synced 2024-12-22 14:07:15 +00:00
KSLog with iterable
This commit is contained in:
parent
2b79b6d060
commit
63b29d3665
@ -3,6 +3,7 @@
|
||||
## 0.0.2
|
||||
|
||||
* 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
|
||||
|
||||
|
@ -44,9 +44,12 @@ expect fun KSLog(
|
||||
|
||||
fun KSLog(
|
||||
defaultTag: String,
|
||||
levels: Set<LogLevel>
|
||||
): KSLog = KSLog (defaultTag) { l, _, _, _ ->
|
||||
levels: Iterable<LogLevel>
|
||||
): KSLog {
|
||||
val levels = levels.toSet()
|
||||
return KSLog (defaultTag) { l, _, _, _ ->
|
||||
l in levels
|
||||
}
|
||||
}
|
||||
|
||||
fun KSLog(
|
||||
|
Loading…
Reference in New Issue
Block a user