cocos2d-JS cc.log日志输出

1.error

error

(
  • obj
  • subst
)

输出错误消息到 Cocos Creator 编辑器的 Console 或运行时页面端的 Console 中。

  • 在 Cocos Creator 中,错误信息显示是红色的。
  • 在 Chrome 中,错误信息有红色的图标以及红色的消息文本。
名称类型描述
objAny

A JavaScript string containing zero or more substitution strings.

substAny

JavaScript objects with which to replace substitution strings within msg. This gives you additional control over the format of the output.




2.warn


warn

(
  • obj
  • subst
)

输出警告消息到 Cocos Creator 编辑器的 Console 或运行时 Web 端的 Console 中。

  • 在 Cocos Creator 中,警告信息显示是黄色的。
  • 在 Chrome 中,警告信息有着黄色的图标以及黄色的消息文本。
名称类型描述
objAny

A JavaScript string containing zero or more substitution strings.

substAny

JavaScript objects with which to replace substitution strings within msg. This gives you additional control over the format of the output.

3.log

log

(
  • obj
  • subst
)

输出一条消息到 Cocos Creator 编辑器的 Console 或运行时 Web 端的 Console 中。

名称类型描述
objAny

A JavaScript string containing zero or more substitution strings.

substAny

JavaScript objects with which to replace substitution strings within msg. This gives you additional control over the format of the output.

4.info

info

(
  • obj
  • subst
)

输出一条信息消息到 Cocos Creator 编辑器的 Console 或运行时 Web 端的 Console 中。

  • 在 Cocos Creator 中,Info 信息显示是蓝色的。
  • 在 Firefox 和 Chrome 中,Info 信息有着小 “i” 图标。
名称类型描述
objAny

A JavaScript string containing zero or more substitution strings.

substAny

JavaScript objects with which to replace substitution strings within msg. This gives you additional control over the format of the output.

转载于:https://www.cnblogs.com/hiwoshixiaoyu/p/10035062.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值