Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何防止节点输出我使用 io.sockets.emit(...) 发出的数据?我没有手动记录数据。我希望有数百个用户连接到节点服务器,所以我不希望终端窗口发疯。任何帮助表示赞赏。
您需要将日志级别选项设置为 0,如下所示:
var io = require('socket.io').listen(port, host); io.set('log level', 0);