Removed function in loop
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user