diff --git a/CHANGELOG.md b/CHANGELOG.md index 8902e5b..219391e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/commonMain/kotlin/KSLog.kt b/src/commonMain/kotlin/KSLog.kt index a822bdb..1a9a902 100644 --- a/src/commonMain/kotlin/KSLog.kt +++ b/src/commonMain/kotlin/KSLog.kt @@ -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