1 Star 0 Fork 5.1K

youguilin / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
console-logs.md 4.10 KB
一键复制 编辑 原始数据 按行查看 历史
mamingshuai 提交于 2021-06-02 01:00 . update OpenHarmony 2.0 Canary

Console Logs

Module to Import

No module is required.

Permission List

None

Log Category

Prints a log using console.debug|log|info|warn|error(message).

  • Parameter

    Name

    Type

    Mandatory

    Description

    message

    string

    Yes

    Text to print

  • Example

    var versionCode = 1;
    console.info('Hello World. The current version code is ' + versionCode);

    Switch to the HiLog window at the bottom of HUAWEI DevEco Studio. Specifically, select the current device and process, set the log level to Info, and enter Hello World in the search box. Logs that meet the search criteria are displayed, as shown in the following figure.

    NOTE: The console.log() function prints logs at the debug level.

1
https://gitee.com/yougl/docs.git
git@gitee.com:yougl/docs.git
yougl
docs
docs
master

搜索帮助