The HiLog subsystem allows your applications or services to output logs based on the specified type, level, and format string. Such logs help you learn the running status of applications and better debug programs.
This document describes only API functions. For details about log printing requirements, see [Logging Guide](../../../contribute/OpenHarmony-Log-guide.md).
> **NOTE**<br>
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
// You can pass the callback of the on function to cancel listening for a certain type of callback. If you do not pass the callback, you will cancel listening for all callbacks.
...
...
@@ -505,7 +505,7 @@ Enables listening for the **close** events of a WebSocket connection. This API u
```js
letws=webSocket.createWebSocket();
ws.on('close',(err,value)=>{
console.log("on close, code is "+value.code+", reason is "+value.reason);
console.log("on close, code is "+value['code']+", reason is "+value['reason']);