Log Level Control

2,044 views
Skip to first unread message

ndaversa

unread,
Jun 22, 2011, 11:22:03 AM6/22/11
to Socket.IO
Quick question, when running socket.io with node it seems the debug
log is verbose (which is nice).

However how can I change what gets logged?

For example, in a high traffic situation my console gets flooded
with ...

websocket received data packet 5 ::: <DATA HERE>

Here is my simple server example....

1 var connect = require('connect'),
2 io = require('socket.io');
3
4 var app = connect.createServer(connect.static(process.cwd()));
5 app.listen(3000);
6
7 // socket.io
8 var socket = io.listen(app);
9 socket.sockets.on('connection', function(client){
10
11 client.on('motion', function (m){
12 client.broadcast.emit ('motion', m);
13 });
14
15 });

Thanks for your time.

ND

cwh

unread,
Jun 22, 2011, 12:20:31 PM6/22/11
to sock...@googlegroups.com
https://github.com/LearnBoost/Socket.IO-node/wiki/Configuring-Socket.IO

under "Understanding the configure method" --- io.set('log level', 1);
--
- cwh
Reply all
Reply to author
Forward
0 new messages