I would like to remove the debugging mode. I am using express
, redis
, socket.io
and connect-redis
, but I do not know where the debugging mode comes from.
Someone has an idea?
To use this module while running the express app, set the DEBUG environment variable to express:* The output generated on running the command is shown below: These logs help in finding any bug in the program and tell which part of the program is creating the problem. This gives logs only of the router part.
Morgan — HTTP logging middleware for express. It provides the ability to log incoming requests by specifying the formatting of log instance based on different request related information. For example: :method :url :status :response-time ms - :res[content-length]
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With