Logger

TRTC. Logger

提供日志设置方法,包括设置日志输出等级、打开或关闭日志上传。

Members

(static, readonly) LogLevel :number

Properties:
Name Type Description
TRACE number

输出所有日志

DEBUG number

输出 DEBUG、INFO、WARN、ERROR 等级日志

INFO number

输出 INFO、WARN、ERROR 等级日志

WARN number

输出 WARN、ERROR 等级日志

ERROR number

输出 ERROR 等级日志

NONE number

不输出任何日志

日志输出等级

Type:
  • number

Methods

(static) setLogLevel(level)

设置日志输出等级
默认输出 INFO 日志等级,该日志等级包含 SDK 关键路径信息。

Example
// 输出INFO以上日志等级
TRTC.Logger.setLogLevel(TRTC.Logger.LogLevel.INFO);
Parameters:
Name Type Description
level LogLevel

日志输出等级 LogLevel

(static) enableUploadLog()

打开日志上传
默认打开日志上传。如无特别原因,请保持打开日志上传,以便我们帮助您定位线上问题。

(static) disableUploadLog()

关闭日志上传
注意: 如果您关闭了日志上传,我们将无法协助您定位线上问题!