未验证 提交 290c7c3f 编写于 作者: Z zengyawen 提交者: Gitee

syscap改造

Signed-off-by: Nzengyawen <zengyawen1@huawei.com>
上级 cdcd84d2
...@@ -10,9 +10,6 @@ ...@@ -10,9 +10,6 @@
import hilog from '@ohos.hilog'; import hilog from '@ohos.hilog';
``` ```
## 系统能力
SystemCapability.HiviewDFX.HiLog
## hilog.debug ## hilog.debug
...@@ -20,6 +17,8 @@ debug(domain: number, tag: string, format: string, ...args: any[]) : void ...@@ -20,6 +17,8 @@ debug(domain: number, tag: string, format: string, ...args: any[]) : void
debug日志输出,打印debug级别日志。 debug日志输出,打印debug级别日志。
**系统能力:** SystemCapability.HiviewDFX.HiLog
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
...@@ -41,12 +40,14 @@ hilog.debug(0xFF00, "testTag", "%d: %{private}s World %{public}f", 1, "hello", 3 ...@@ -41,12 +40,14 @@ hilog.debug(0xFF00, "testTag", "%d: %{private}s World %{public}f", 1, "hello", 3
09-08 12:49:35.941 1547 2452 D FF00/testTag: 1: hello World 3.0 09-08 12:49:35.941 1547 2452 D FF00/testTag: 1: hello World 3.0
``` ```
## **hilog.info** ## hilog.info
info(domain: number, tag: string, format: string, ...args: any[]) : void info(domain: number, tag: string, format: string, ...args: any[]) : void
info日志输出,打印info级别日志。 info日志输出,打印info级别日志。
**系统能力:** SystemCapability.HiviewDFX.HiLog
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
...@@ -74,6 +75,8 @@ warn(domain: number, tag: string, format: string, ...args: any[]) : void ...@@ -74,6 +75,8 @@ warn(domain: number, tag: string, format: string, ...args: any[]) : void
warn日志输出,打印warn级别日志。 warn日志输出,打印warn级别日志。
**系统能力:** SystemCapability.HiviewDFX.HiLog
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
...@@ -101,6 +104,8 @@ error(domain: number, tag: string, format: string, ...args: any[]) : void ...@@ -101,6 +104,8 @@ error(domain: number, tag: string, format: string, ...args: any[]) : void
error日志输出,打印error级别日志。 error日志输出,打印error级别日志。
**系统能力:** SystemCapability.HiviewDFX.HiLog
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
...@@ -128,6 +133,8 @@ fatal(domain: number, tag: string, format: string, ...args: any[]) : void ...@@ -128,6 +133,8 @@ fatal(domain: number, tag: string, format: string, ...args: any[]) : void
fatal日志输出,打印fatal级别日志。 fatal日志输出,打印fatal级别日志。
**系统能力:** SystemCapability.HiviewDFX.HiLog
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
...@@ -155,6 +162,8 @@ isLoggable(domain: number, tag: string, level: LogLevel) : boolean ...@@ -155,6 +162,8 @@ isLoggable(domain: number, tag: string, level: LogLevel) : boolean
检查一个domain、tag和日志级别是否被禁止打印日志。 检查一个domain、tag和日志级别是否被禁止打印日志。
**系统能力:** SystemCapability.HiviewDFX.HiLog
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
...@@ -173,6 +182,8 @@ hilog.isLoggable(0xFF00, "testTag", hilog.DEBUG); ...@@ -173,6 +182,8 @@ hilog.isLoggable(0xFF00, "testTag", hilog.DEBUG);
用于表示事件类型。 用于表示事件类型。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.HiviewDFX.HiLog。
| 名称 | 默认值 | 说明 | | 名称 | 默认值 | 说明 |
| ----- | ------ | ----------- | | ----- | ------ | ----------- |
| DEBUG | 3 | DEBUG级别。 | | DEBUG | 3 | DEBUG级别。 |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册