Namespace: log

log

向 Web 控制台输出一条消息,可以通过设置等级过滤输出的消息。

Example

Hilo3d.log.level = Hilo3d.log.LEVEL_LOG | Hilo3d.log.LEVEL_ERROR;
Hilo3d.log.error("ERROR!");

Members Show Inherited

staticlog.levelNumber

log级别

Default Value:
  • LEVEL_LOG | LEVEL_WARN | LEVEL_ERROR

static,readonlylog.LEVEL_NONENumber

不显示任何

Default Value:
  • 0

static,readonlylog.LEVEL_LOGNumber

显示 log

Default Value:
  • 1

static,readonlylog.LEVEL_WARNNumber

显示 warn

Default Value:
  • 2

static,readonlylog.LEVEL_ERRORNumber

显示 error

Default Value:
  • 4

Methods Show Inherited

staticlog.log(){log}

log,等同 console.log

Returns:
Type Description
log this

staticlog.warn(){log}

warn,等同 console.warn

Returns:
Type Description
log this

staticlog.error(){log}

error,等同 console.error

Returns:
Type Description
log this

staticlog.logOnce(id){log}

logOnce 相同 id 只 log 一次

Name Type Description
id String
Returns:
Type Description
log this

staticlog.warnOnce(id){log}

warnOnce 相同 id 只 once 一次

Name Type Description
id String
Returns:
Type Description
log this

staticlog.errorOnce(id){log}

errorOnce 相同 id 只 error 一次

Name Type Description
id String
Returns:
Type Description
log this