Refactor console logging code.
Util.Debug, Util.Info, Util.Warn, Util.Error routines instead of
direct calls to console.*. Add "logging=XXX" query variable that sets
the logging level (default is "warn").
Logging values:
debug: code debug logging (many calls in performance path are also
commented for performance reasons).
info: informative messages including timing information.
warn: significant events
error: something has gone wrong
This commit is contained in:
+1
-1
@@ -111,7 +111,7 @@ decode: function (data, offset) {
|
||||
var padding = (data.charAt(i) == pad);
|
||||
// Skip illegal characters and whitespace
|
||||
if (c == -1) {
|
||||
console.log("Illegal character '" + data.charCodeAt(i) + "'");
|
||||
console.error("Illegal character '" + data.charCodeAt(i) + "'");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user