
var Console = function () {
	UIALogger.logDebug ('created the console');
};

Console.prototype.log = function (str) {
	UIALogger.logDebug (str);
};

var Console = function () {
	UIALogger.logDebug ('created the console');
};

Console.prototype.log = function (str) {
	UIALogger.logDebug (format.apply (this, arguments));
};

//
// Taken from node.js
//
var formatRegExp = /%[sdj%]/g;
var format = function(f) {
  if (typeof f !== 'string') {
    var objects = [];
    for (var i = 0; i < arguments.length; i++) {
      objects.push(inspect(arguments[i]));
    }
    return objects.join(' ');
  }

  var i = 1;
  var args = arguments;
  var len = args.length;
  var str = String(f).replace(formatRegExp, function(x) {
    if (x === '%%') return '%';
    if (i >= len) return x;
    switch (x) {
      case '%s': return String(args[i++]);
      case '%d': return Number(args[i++]);
      case '%j': return JSON.stringify(args[i++]);
      default:
        return x;
    }
  });
  for (var x = args[i]; i < len; x = args[++i]) {
    if (x === null || typeof x !== 'object') {
      str += ' ' + x;
    } else {
      str += ' ' + inspect(x);
    }
  }
  return str;
};
add printf style formating, based on node.js