mirror of
https://github.com/InsanusMokrassar/KSLog.git
synced 2025-11-12 01:10:13 +00:00
KSLog with iterable
This commit is contained in:
@@ -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,10 +44,13 @@ 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(
|
||||
defaultTag: String,
|
||||
|
||||
Reference in New Issue
Block a user