110

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.

Node debug

Someone has an idea?

nbro
  • 15,395
  • 32
  • 113
  • 196
Vsplit
  • 1,988
  • 3
  • 15
  • 18

2 Answers2

227

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
DATEx2
  • 3,585
  • 1
  • 24
  • 26
Alfred
  • 60,935
  • 33
  • 147
  • 186
  • 1
    I just tried this, but I'm getting TypeError: Object # has no method 'set' ... what's wrong? I have io = require("socket.io") – user644745 Oct 10 '11 at 07:51
  • 3
    @user644745: It works for me if you set `io` to `require("socket.io").listen(app)` (or something similar). Thanks much for the answer, those logs were verbose and messing up the console. – pimvdb Nov 29 '11 at 12:42
7

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.

Ito
  • 2,167
  • 3
  • 23
  • 32