mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 01:12:42 +08:00
Merge pull request #398 from knoxHuang/master
Modify cc.log prompt mode
This commit is contained in:
+9
-3
@@ -471,9 +471,15 @@ cc._initDebugSetting = function (mode) {
|
||||
* @param {any} obj - A JavaScript string containing zero or more substitution strings.
|
||||
* @param {any} ...subst - JavaScript objects with which to replace substitution strings within msg. This gives you additional control over the format of the output.
|
||||
*/
|
||||
cc.log = function () {
|
||||
return console.log.apply(console, arguments);
|
||||
};
|
||||
if (console.log.bind) {
|
||||
// use bind to avoid pollute call stacks
|
||||
cc.log = console.log.bind(console);
|
||||
}
|
||||
else {
|
||||
cc.log = function () {
|
||||
return console.log.apply(console, arguments);
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Outputs an informational message to the Cocos Creator Console (editor) or Web Console (runtime).
|
||||
* - In Cocos Creator, info is blue.
|
||||
|
||||
Reference in New Issue
Block a user