diff --git a/src/commonMain/kotlin/KSLog.kt b/src/commonMain/kotlin/KSLog.kt index a8c0487..495b152 100644 --- a/src/commonMain/kotlin/KSLog.kt +++ b/src/commonMain/kotlin/KSLog.kt @@ -44,7 +44,14 @@ expect fun KSLog( fun KSLog( defaultTag: String, - levels: Set = LogLevel.values().toSet() + levels: Set ): KSLog = KSLog (defaultTag) { l, _, _, _ -> l in levels } + +fun KSLog( + defaultTag: String, + minLoggingLevel: LogLevel = LogLevel.VERBOSE +): KSLog = KSLog (defaultTag) { l, _, _, _ -> + minLoggingLevel.ordinal <= l.ordinal +}