for (i = 0; i < arguments.length; i++) {
// We're not formatting objects for now.
- if (typeof arguments[i].message === 'object') {
- message.push(arguments[i].message);
- } else {
- message.push(this.format(arguments[i]));
- }
- if (!severity) {
- severity = arguments[i]._level
+ if (!arguments[i].__skipConsole && !arguments[i].message.__skipConsole) {
+ if (typeof arguments[i].message === 'object') {
+ message.push(arguments[i].message);
+ } else {
+ message.push(this.format(arguments[i]));
+ }
+ if (!severity) {
+ severity = arguments[i]._level
+ }
}
}
prototype : {
serverUrl : '/',
- init : function () {
- this._socket = io.connect(this.serverUrl);
+ init : function (config) {
+ var logger = this;
+ logger.socketIo = io;
+
+ if (config) {
+ for (property in config) {
+ logger[property] = config[property];
+ }
+ }
+
+ logger._socket = logger.socketIo.connect(logger.serverUrl);
},
log : function () {