Skip to content

Commit 4ab1546

Browse files
committed
docs: update kavaref-core
1 parent 9ef95d7 commit 4ab1546

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

docs-source/src/en/library/kavaref-core.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,16 @@ prints more detailed step-by-step filtering condition logs to the console during
525525

526526
If you want to turn off all log printing of KavaRef, you can set `KavaRef.logLevel = KavaRefRuntime.LogLevel.OFF`.
527527

528+
::: tip
529+
530+
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.
531+
532+
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.
533+
534+
On the Android platform, KavaRef uses `android.util.Log` as an implementation of log printing, and you don't need additional configuration.
535+
536+
:::
537+
528538
If you have more advanced requirements, you can implement `KavaRefRuntime.Logger` to customize your own log printing method.
529539

530540
> The following example

docs-source/src/zh-cn/library/kavaref-core.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,16 @@ KavaRef 提供了其自身的日志管理功能,你可以通过 `KavaRef.logLe
506506

507507
如果你想关闭 KavaRef 的全部日志打印,你可以设置 `KavaRef.logLevel = KavaRefRuntime.LogLevel.OFF`
508508

509+
::: tip
510+
511+
在 JVM 平台,KavaRef 使用 SLF4J 作为日志打印的实现,你可以通过配置 SLF4J 的实现来控制日志的打印。
512+
513+
默认情况下,你只需要引入 `org.slf4j:slf4j-simple` 作为依赖即可完成日志提供者实现,在 SpringBoot 等项目中,你无需额外配置。
514+
515+
在 Android 平台,KavaRef 使用 `android.util.Log` 作为日志打印的实现,你无需额外配置。
516+
517+
:::
518+
509519
如果你有更高级的需求,你可以实现 `KavaRefRuntime.Logger` 来自定义自己的日志打印方式。
510520

511521
> 示例如下

0 commit comments

Comments
 (0)