mirror of
https://github.com/InsanusMokrassar/KSLog.git
synced 2024-12-22 05:57:14 +00:00
add new KSLog factory
This commit is contained in:
parent
afad845108
commit
c48ceefd8a
@ -44,7 +44,14 @@ expect fun KSLog(
|
||||
|
||||
fun KSLog(
|
||||
defaultTag: String,
|
||||
levels: Set<LogLevel> = LogLevel.values().toSet()
|
||||
levels: Set<LogLevel>
|
||||
): KSLog = KSLog (defaultTag) { l, _, _, _ ->
|
||||
l in levels
|
||||
}
|
||||
|
||||
fun KSLog(
|
||||
defaultTag: String,
|
||||
minLoggingLevel: LogLevel = LogLevel.VERBOSE
|
||||
): KSLog = KSLog (defaultTag) { l, _, _, _ ->
|
||||
minLoggingLevel.ordinal <= l.ordinal
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user