From 4ab1546e57fc56313e90ec3205d453c2c92a13c0 Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Tue, 23 Sep 2025 14:39:25 +0800 Subject: [PATCH] docs: update kavaref-core --- docs-source/src/en/library/kavaref-core.md | 10 ++++++++++ docs-source/src/zh-cn/library/kavaref-core.md | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/docs-source/src/en/library/kavaref-core.md b/docs-source/src/en/library/kavaref-core.md index 52deda8..0f5551b 100644 --- a/docs-source/src/en/library/kavaref-core.md +++ b/docs-source/src/en/library/kavaref-core.md @@ -525,6 +525,16 @@ prints more detailed step-by-step filtering condition logs to the console during If you want to turn off all log printing of KavaRef, you can set `KavaRef.logLevel = KavaRefRuntime.LogLevel.OFF`. +::: tip + +On the JVM platform, KavaRef uses SLF4J as the implementation of log printing, and you can control log printing by configuring the implementation of SLF4J. + +By default, you only need to introduce `org.slf4j:slf4j-simple` as a dependency to complete the log provider implementation, and in projects such as SpringBoot, you do not need additional configuration. + +On the Android platform, KavaRef uses `android.util.Log` as an implementation of log printing, and you don't need additional configuration. + +::: + If you have more advanced requirements, you can implement `KavaRefRuntime.Logger` to customize your own log printing method. > The following example diff --git a/docs-source/src/zh-cn/library/kavaref-core.md b/docs-source/src/zh-cn/library/kavaref-core.md index c469791..382d9d5 100644 --- a/docs-source/src/zh-cn/library/kavaref-core.md +++ b/docs-source/src/zh-cn/library/kavaref-core.md @@ -506,6 +506,16 @@ KavaRef 提供了其自身的日志管理功能,你可以通过 `KavaRef.logLe 如果你想关闭 KavaRef 的全部日志打印,你可以设置 `KavaRef.logLevel = KavaRefRuntime.LogLevel.OFF`。 +::: tip + +在 JVM 平台,KavaRef 使用 SLF4J 作为日志打印的实现,你可以通过配置 SLF4J 的实现来控制日志的打印。 + +默认情况下,你只需要引入 `org.slf4j:slf4j-simple` 作为依赖即可完成日志提供者实现,在 SpringBoot 等项目中,你无需额外配置。 + +在 Android 平台,KavaRef 使用 `android.util.Log` 作为日志打印的实现,你无需额外配置。 + +::: + 如果你有更高级的需求,你可以实现 `KavaRefRuntime.Logger` 来自定义自己的日志打印方式。 > 示例如下