https://img-blog.csdnimg.cn/32db9ce43ef64316a2e37a31f4cee033.gif
编程小鱼酱yu612.com,点击前往

cocos2d-JS cc.log日志输出

1.error

error

(
  • obj
  • subst
)

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

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

A JavaScript string containing zero or more substitution strings.

subst Any

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 中,警告信息有着黄色的图标以及黄色的消息文本。
名称 类型 描述
obj Any

A JavaScript string containing zero or more substitution strings.

subst Any

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 中。

名称 类型 描述
obj Any

A JavaScript string containing zero or more substitution strings.

subst Any

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” 图标。
名称 类型 描述
obj Any

A JavaScript string containing zero or more substitution strings.

subst Any

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

posted @ 2016-10-31 13:02  鱼酱  阅读(1776)  评论(0编辑  收藏  举报

https://img-blog.csdnimg.cn/32db9ce43ef64316a2e37a31f4cee033.gif
编程小鱼酱yu612.com,点击前往