From 194e52f5215f3b80290939fdfcc6370bb7d89311 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 31 Jul 2022 19:15:53 +0600 Subject: [PATCH] addDefaultKSLog --- CHANGELOG.md | 2 +- src/commonMain/kotlin/KSLog.kt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 507e6ce..9978448 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## 0.4.2 -* Add `setDefaultKSLog` +* Add `setDefaultKSLog` and `addDefaultKSLog` * Add `plus` operation for two `KSLog` instances to call them both on each log performing * Add `KSLog` factory for simple creation of `CallbackKSLog` diff --git a/src/commonMain/kotlin/KSLog.kt b/src/commonMain/kotlin/KSLog.kt index 7d67fe5..40d8270 100644 --- a/src/commonMain/kotlin/KSLog.kt +++ b/src/commonMain/kotlin/KSLog.kt @@ -1,6 +1,7 @@ package dev.inmo.kslog.common import dev.inmo.kslog.common.filter.filtered +import dev.inmo.kslog.common.utils.plus enum class LogLevel { @@ -112,3 +113,4 @@ fun KSLog( } fun setDefaultKSLog(newDefault: KSLog) { KSLog.default = newDefault } +fun addDefaultKSLog(newDefault: KSLog) { KSLog.default = KSLog.default + newDefault }