Skip to content

Show line number in console statements #3289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 12, 2016
Merged

Show line number in console statements #3289

merged 2 commits into from
Jun 12, 2016

Conversation

nil1511
Copy link
Contributor

@nil1511 nil1511 commented May 20, 2016

Show line number and file name in console while logging cc.log

@nil1511
Copy link
Contributor Author

nil1511 commented May 21, 2016

@zilongshanren @pandamicro Please review this.

return console.log.apply(console, arguments);
};
cc.error = Function.prototype.bind.call(console.error, console);
cc.assert = Function.prototype.bind.call(console.assert, console);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does console.assert supported on all major browsers ? including mobile browsers ?

@pandamicro
Copy link
Contributor

Thanks, it's indeed much more useful

@nil1511
Copy link
Contributor Author

nil1511 commented May 26, 2016

updated the pull request. If console.assert is not supported it will fallback to the old method

@pandamicro pandamicro merged commit 7ed8e7a into cocos2d:develop Jun 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants