Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Setting 'log' to false breaks socket.io #400

Closed
s3u opened this issue Jul 20, 2011 · 4 comments
Closed

Setting 'log' to false breaks socket.io #400

s3u opened this issue Jul 20, 2011 · 4 comments

Comments

@s3u
Copy link

s3u commented Jul 20, 2011

Here is a repro.

var io = require('socket.io').listen(app);
io.set('log', false);

This causes errors like

20 Jul 09:04:17 - error: TypeError: Cannot call method 'debug' of undefined
at Manager.authorize (/Users/subrah/dev/projects/ebay/socket.io/lib/manager.js:892:14)
at Manager.handleHandshake (/Users/subrah/dev/projects/ebay/socket.io/lib/manager.js:773:8)
at Manager.handleRequest (/Users/subrah/dev/projects/ebay/socket.io/lib/manager.js:523:12)

@3rd-Eden
Copy link
Contributor

Than dont set it to false? As it requires a log instance. If you dont want log output you should set the log level

~ Arnout Kazemier

On Jul 20, 2011, at 6:07 PM, s3ureply@reply.github.com wrote:

Here is a repro.

var io = require('socket.io').listen(app);
io.set('log', false);

This causes errors like

20 Jul 09:04:17 - error: TypeError: Cannot call method 'debug' of undefined
at Manager.authorize (/Users/subrah/dev/projects/ebay/socket.io/lib/manager.js:892:14)
at Manager.handleHandshake (/Users/subrah/dev/projects/ebay/socket.io/lib/manager.js:773:8)
at Manager.handleRequest (/Users/subrah/dev/projects/ebay/socket.io/lib/manager.js:523:12)

Reply to this email directly or view it on GitHub:
#400

@s3u
Copy link
Author

s3u commented Jul 20, 2011

Sure. That'll do. But then why have that setting?

@3rd-Eden
Copy link
Contributor

So you can replace the logger. You might want to log to files or a db instead of the std out

~ Arnout Kazemier

On Jul 20, 2011, at 6:35 PM, s3ureply@reply.github.com wrote:

Sure. That'll do. But then why have that setting?

Reply to this email directly or view it on GitHub:
#400 (comment)

@s3u
Copy link
Author

s3u commented Jul 20, 2011

Ah - that makes sense.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants