Map Util.[Debug|Info|Warn|Error] to console.[debug|info|warn|error].

This change will preserve file and line number reporting when Util.[Debug|Info|Warn|Error] is called, which should make development and debugging a lot easier.
This commit is contained in:
Tyler G. Hicks-Wright 2016-01-22 17:16:01 -07:00
parent 670dbddb54
commit a4ffd2d49a
1 changed files with 4 additions and 4 deletions

View File

@ -211,13 +211,13 @@ Util.init_logging = function (level) {
/* jshint -W086 */
switch (level) {
case 'debug':
Util.Debug = function (msg) { console.log(msg); };
Util.Debug = console.debug.bind(window.console);
case 'info':
Util.Info = function (msg) { console.log(msg); };
Util.Info = console.info.bind(window.console);
case 'warn':
Util.Warn = function (msg) { console.warn(msg); };
Util.Warn = console.warn.bind(window.console);
case 'error':
Util.Error = function (msg) { console.error(msg); };
Util.Error = console.error.bind(window.console);
case 'none':
break;
default: