Logger

TRTC. Logger

Log APIs for setting the log output level, enabling/disabling log upload, etc.

Members

(static, readonly) LogLevel :number

Properties:
Name Type Description
TRACE number

All

DEBUG number

DEBUG, INFO, WARN, and ERROR

INFO number

INFO, WARN, and ERROR

WARN number

WARN and ERROR

ERROR number

ERROR

NONE number

Off

Log output level

Type:
  • number

Methods

(static) setLogLevel(Log)

Set the log output level
Logs whose severity level is INFO or above are output by default, which include the SDK’s critical path information.

Example
// Output logs whose severity level is INFO or above
TRTC.Logger.setLogLevel(TRTC.Logger.LogLevel.INFO);
Parameters:
Name Type Description
Log LogLevel

output level. For details, see LogLevel

(static) enableUploadLog()

Enable log upload
Log upload is enabled by default so that we can help you identify problems online. You are advised to keep it enabled.

(static) disableUploadLog()

Disable log upload
Note:We won’t be able to identify problems for you online if you disable log upload.