Improving logs (adding date)
This commit is contained in:
parent
dcc78786a9
commit
69cfac290d
@ -103,9 +103,9 @@ export class IoSocketController {
|
|||||||
|
|
||||||
// Let's log server load when a user joins
|
// Let's log server load when a user joins
|
||||||
let srvSockets = this.Io.sockets.sockets;
|
let srvSockets = this.Io.sockets.sockets;
|
||||||
console.log('A user joined (', Object.keys(srvSockets).length, ' connected users)');
|
console.log(new Date().toISOString() + ' A user joined (', Object.keys(srvSockets).length, ' connected users)');
|
||||||
si.currentLoad().then(data => console.log('Current load: ', data.avgload));
|
si.currentLoad().then(data => console.log(' Current load: ', data.avgload));
|
||||||
si.currentLoad().then(data => console.log('CPU: ', data.currentload, '%'));
|
si.currentLoad().then(data => console.log(' CPU: ', data.currentload, '%'));
|
||||||
// End log server load
|
// End log server load
|
||||||
|
|
||||||
/*join-rom event permit to join one room.
|
/*join-rom event permit to join one room.
|
||||||
|
Loading…
Reference in New Issue
Block a user