If the first parameter passed into console.log() is not a string, all
parameters will be printed as formated by sys.inspect. This change
also affects console.info and console.warn.
// console object
var formatRegExp = /%[sdj]/g;
function format (f) {
+ if (typeof f !== 'string') {
+ var objects = [], sys = module.requireNative('sys');
+ for (var i = 0; i < arguments.length; i++) {
+ objects.push(sys.inspect(arguments[i]));
+ }
+ return objects.join(' ');
+ }
+
+
var i = 1;
var args = arguments;
return String(f).replace(formatRegExp, function (x) {