KSLog with varargs

This commit is contained in:
InsanusMokrassar 2022-06-08 16:10:34 +06:00
parent 63b29d3665
commit c15d7f23e2
2 changed files with 8 additions and 0 deletions

View File

@ -4,6 +4,7 @@
* 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
* Now it is possible to create `KSLog` using vararg log levels
## 0.0.1

View File

@ -52,6 +52,13 @@ fun KSLog(
}
}
inline fun KSLog(
defaultTag: String,
firstLevel: LogLevel,
secondLevel: LogLevel,
vararg otherLevels: LogLevel
): KSLog = KSLog(defaultTag, setOf(firstLevel, secondLevel, *otherLevels))
fun KSLog(
defaultTag: String,
minLoggingLevel: LogLevel = LogLevel.VERBOSE