node.js - nodejs broadcast in a room console logs -


when broadcast event in room along data, showing event n times in console. n = number of players in room.

if 10 players in room broadcast in room, 10 messages of event data on console.

my question = whatever mentioned above correct or not ? getting multiple logs on console equal count of players in room, hence need confirm this.

(assuming question "how prevent messages being logged")

the default log level socket.io 3 (debug).

you can use io.set() change less verbose level:

  var io = require('socket.io').listen(...);    io.set('log level', 1); 

according the configuration page of socket.io, these possible log levels:

  • 0 – error
  • 1 – warn
  • 2 – info
  • 3 – debug (the default)

Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -