How to remove debugging from an Express app?

前端 未结 2 429
一整个雨季
一整个雨季 2020-12-07 10:36

I would like to remove the debugging mode. I am using express, redis, socket.io and connect-redis, but I do not know wher

相关标签:
2条回答
  • 2020-12-07 10:50

    Just configure the log level to number 1 to avoid income unnecessary messages.

    You can figure out more information about Socket.IO options on this link.

    0 讨论(0)
  • 2020-12-07 11:02

    Update

    To completely remove debugging use:

    var io = require('socket.io').listen(app, { log: false });
    

    Where app is node.js http server / express etc.


    You forgot to mention you are also using socket.io. This is coming from socket.io. You can disable this by configuration:

    io.set('log level', 1); // reduce logging
    
    0 讨论(0)
提交回复
热议问题