diff --git a/lib/logger.js b/lib/logger.js index 546a99f3c..878a60e50 100644 --- a/lib/logger.js +++ b/lib/logger.js @@ -9,17 +9,6 @@ var log4js = require('log4js'); var helper = require('./helper'); var constant = require('./constants'); -// Special Wrapper for Socket.io :( -var LogWrapper = function(name, level) { - this.logger = log4js.getLogger(name); - this.logger.setLevel(level); -}; -['error', 'warn', 'info', 'debug'].forEach(function(level) { - LogWrapper.prototype[level] = function() { - this.logger[level].apply(this.logger, arguments); - }; -}); - // #### Public Functions // Setup the logger by passing in the configuration options. It needs @@ -61,15 +50,11 @@ var setup = function(level, colors, appenders) { // to be used as a logger for socket.io. // * `level`, which defaults to the global level. var create = function(name, level) { - if (name === 'socket.io') { - return new LogWrapper('socket.io', level); - } else { - var logger = log4js.getLogger(name || 'karma'); - if (helper.isDefined(level)) { - logger.setLevel(level); - } - return logger; + var logger = log4js.getLogger(name || 'karma'); + if (helper.isDefined(level)) { + logger.setLevel(level); } + return logger; }; diff --git a/lib/server.js b/lib/server.js index 9f6eac6b3..edef3ac89 100644 --- a/lib/server.js +++ b/lib/server.js @@ -258,12 +258,6 @@ var createSocketIoServer = function(webServer, executor, config) { var server = new Server(webServer, { // avoid destroying http upgrades from socket.io to get proxied websockets working destroyUpgrade: false, - // socket.io has a timeout (15s by default) before destroying a store (a data structure where - // data associated with a socket are stored). Unfortunately this timeout is not cleared - // properly on socket.io shutdown and this timeout prevents karma from exiting cleanly. - // We change this timeout to 0 to make Karma exit just after all tests were executed. - //'client store expiration': 0, - logger: logger.create('socket.io', constant.LOG_ERROR), path: config.urlRoot + 'socket.io/', transports: config.transports });