Update logger documentation

This commit is contained in:
2023-01-12 00:43:42 +08:00
parent 5e478fe285
commit 2805ab359e
2 changed files with 6 additions and 6 deletions

View File

@@ -14,7 +14,7 @@ The usage method is as follows.
loggerD(msg = "This is a log")
```
At this point, `YukiHookAPI` will call `android.util.Log` and `XposedBridge.log` to print this log at the same time.
At this ponit, `YukiHookAPI` will call `android.util.Log` and log function in (Xposed) Host environment to print this log at the same time.
The default `TAG` of the log is the value you set in `YukiHookLogger.Configs.tag`.
@@ -36,7 +36,7 @@ The printed result is as shown below.
You can also use `LoggerType` to customize the type of log printing.
You can choose to use `android.util.Log` or `XposedBridge.log` to print logs.
You can choose to use `android.util.Log` or the log function in the (Xposed) Host environment to print logs.
The default type is `LoggerType.BOTH`, which means that both methods are used to print logs.
@@ -53,7 +53,7 @@ Or just use `XposedBridge.log` to print the log, this method can only be used in
> The following example
```kotlin
loggerD(tag = "YukiHookAPI", msg = "This is a log", type = LoggerType.XPOSEDBRIDGE)
loggerD(tag = "YukiHookAPI", msg = "This is a log", type = LoggerType.XPOSED_ENVIRONMENT)
```
If you want to intelligently distinguish the (Xposed) Host environment from the Module environment, you can write it in the following form.

View File

@@ -14,7 +14,7 @@
loggerD(msg = "This is a log")
```
此时,`YukiHookAPI` 会调用 `android.util.Log``XposedBridge.log` 同时打印这条日志。
此时,`YukiHookAPI` 会调用 `android.util.Log`(Xposed) 宿主环境中的日志功能同时打印这条日志。
日志默认的 `TAG` 为你在 `YukiHookLogger.Configs.tag` 中设置的值。
@@ -34,7 +34,7 @@ loggerD(tag = "YukiHookAPI", msg = "This is a log")
[YukiHookAPI][D][宿主包名]--> This is a log
```
你还可以使用 `LoggerType` 自定义日志打印的类型,可选择使用 `android.util.Log` 还是 `XposedBridge.log` 来打印日志。
你还可以使用 `LoggerType` 自定义日志打印的类型,可选择使用 `android.util.Log` 还是 (Xposed) 宿主环境中的日志功能来打印日志。
默认类型为 `LoggerType.BOTH`,含义为同时使用这两个方法来打印日志。
@@ -51,7 +51,7 @@ loggerD(tag = "YukiHookAPI", msg = "This is a log", type = LoggerType.LOGD)
> 示例如下
```kotlin
loggerD(tag = "YukiHookAPI", msg = "This is a log", type = LoggerType.XPOSEDBRIDGE)
loggerD(tag = "YukiHookAPI", msg = "This is a log", type = LoggerType.XPOSED_ENVIRONMENT)
```
若你想智能区分 (Xposed) 宿主环境与模块环境,可以写为如下形式。