[英]Is there an alternative to console.log() which lets you print out and update a single line instead of spamming the console?
[英]Prevent Websocket from spamming my console.log
我正在使用Node.js
, Socket.io
和Websocket
。
每次我發出一些東西,它都會在我的console.log
寫出來。 我發出很多東西,所以我的console.log完全無法用於調試目的。
有沒有辦法阻止Websocket
在我的控制台上寫入所有發射事件?
寫的內容的一個例子:
debug - websocket writing 5 ::: {“stuff ....”}
debug - websocket writing 5 ::: {“more stuff ....”}
debug - websocket writing 5 ::: {“更多東西......”}
您需要將日志級別選項設置為0,如下所示:
var io = require('socket.io').listen(port, host);
io.set('log level', 0);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.