fixed socket.io logging

This commit is contained in:
Peter 'Pita' Martischka 2011-11-19 14:14:31 -08:00
parent 53bf7dc19d
commit 2e79bd50a3

View file

@ -436,25 +436,25 @@ async.waterfall([
//this is only a workaround to ensure it works with all browers behind a proxy //this is only a workaround to ensure it works with all browers behind a proxy
//we should remove this when the new socket.io version is more stable //we should remove this when the new socket.io version is more stable
io.set('transports', ['xhr-polling']); //io.set('transports', ['xhr-polling']);
var socketIOLogger = log4js.getLogger("socket.io"); var socketIOLogger = log4js.getLogger("socket.io");
io.set('logger', { io.set('logger', {
debug: function (str) debug: function (str)
{ {
socketIOLogger.debug(str); socketIOLogger.debug.apply(socketIOLogger, arguments);
}, },
info: function (str) info: function (str)
{ {
socketIOLogger.info(str); socketIOLogger.info.apply(socketIOLogger, arguments);
}, },
warn: function (str) warn: function (str)
{ {
socketIOLogger.warn(str); socketIOLogger.warn.apply(socketIOLogger, arguments);
}, },
error: function (str) error: function (str)
{ {
socketIOLogger.error(str); socketIOLogger.error.apply(socketIOLogger, arguments);
}, },
}); });