Cobalt.Logger.JsConsole = Class(Cobalt.Logger, 'JsConsole')({
prototype : {
- console : console,
+ console : null,
formatterOpts : {},
init : function (config) {
}
},
- log : function (logObject) {
- var message;
+ log : function () {
+ var i, messageArray = [], message, severity;
- message = this.format(logObject);
+ for (i = 0; i < arguments.length; i++) {
+ messageArray.push(this.format(arguments[i]));
+ if (!severity) {
+ severity = arguments[i]._level
+ }
+ }
+
+ message = messageArray.join(' ');
- switch (logObject._level){
+ switch (severity){
case 0:
case 1:
case 2:
}
});
+ if (Cobalt.Logger.JsConsole.__objectSpy) {
+ Cobalt.Logger.JsConsole.__objectSpy.destroy();
+ }
+
if (typeof require === 'function') {
global.JsConsole = Cobalt.Logger.JsConsole;
} else {