Removed function in loop

This commit is contained in:
Thomas FORGIONE
2015-07-06 11:26:19 +02:00
parent 80ba3278da
commit c646b54915
3 changed files with 18 additions and 16 deletions

View File

@@ -18,16 +18,16 @@ var log;
if (isDev) {
log = function(elt, color) {
console.log(color + elt + Colors.DEFAULT);
}
};
} else {
log = function(elt, color) {
console.log(elt);
}
};
}
Log.ready = function(msg) {
log('[RDY] ' + new Date() + ' ' + msg, Colors.GREEN);
}
};
Log.request = function(req, res) {
if (req.headers['x-forwarded-for'] !== undefined || isDev) {
@@ -38,7 +38,7 @@ Log.request = function(req, res) {
Colors.CYAN
);
}
}
};
Log.socket = {};
Log.socket.connection = function(socket) {
@@ -47,7 +47,7 @@ Log.socket.connection = function(socket) {
socket.handshake.address + ' connection',
Colors.YELLOW
);
}
};
Log.socket.disconnect = function(socket) {
log(
@@ -55,13 +55,13 @@ Log.socket.disconnect = function(socket) {
socket.handshake.address + ' disconnect',
Colors.YELLOW
);
}
};
Log.dberror = function(error) {
log(
'[DBE] ' + new Date() + ' ' + error,
Colors.RED
);
}
};
module.exports = Log;