diff --git a/src/commonMain/kotlin/filter/FilterKSLog.kt b/src/commonMain/kotlin/filter/FilterKSLog.kt index 9f1ce1a..d369a6c 100644 --- a/src/commonMain/kotlin/filter/FilterKSLog.kt +++ b/src/commonMain/kotlin/filter/FilterKSLog.kt @@ -2,7 +2,7 @@ package dev.inmo.kslog.common.filter import dev.inmo.kslog.common.* -class FilterLogger( +class FilterKSLog( private val fallbackLogger: KSLog, private val messageFilter: MessageFilter ) : KSLog { @@ -30,7 +30,3 @@ class FilterLogger( } } } - -fun KSLog.filtered( - filter: MessageFilter -) = FilterLogger(this, filter) diff --git a/src/commonMain/kotlin/filter/FilteredExtension.kt b/src/commonMain/kotlin/filter/FilteredExtension.kt new file mode 100644 index 0000000..443ea50 --- /dev/null +++ b/src/commonMain/kotlin/filter/FilteredExtension.kt @@ -0,0 +1,8 @@ +package dev.inmo.kslog.common.filter + +import dev.inmo.kslog.common.KSLog +import dev.inmo.kslog.common.MessageFilter + +fun KSLog.filtered( + filter: MessageFilter +) = FilterKSLog(this, filter)