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: false breaks socket.io in manager.js #540

Closed
dimroc opened this issue Sep 28, 2011 · 3 comments
Closed

Setting log: false breaks socket.io in manager.js #540

dimroc opened this issue Sep 28, 2011 · 3 comments

Comments

@dimroc
Copy link

dimroc commented Sep 28, 2011

Hi all,
Let me start of with thanks for a great library.

I'm currently encountering a repeat of issues #491 and #400.
Couldn't reopen the issue but this is clearly a recurring bug.
Write regression unit tests much?

function Manager (server, options) {
  this.server = server;
  this.namespaces = {};
  this.sockets = this.of('');
  this.settings = {
      origins: '*:*'
    , log: true  // io.set('log', 'false'); will lead to an error in manager.js shown below
    , store: new MemoryStore
    , logger: new Logger
    , static: new Static(this)
    , heartbeats: true
    , resource: '/socket.io'
    , transports: defaultTransports
    , authorization: false
    , 'log level': 3
    , 'close timeout': 25
    , 'heartbeat timeout': 15
    , 'heartbeat interval': 20
    , 'polling duration': 20
    , 'flash policy server': true
    , 'flash policy port': 10843
    , 'destroy upgrade': true
    , 'browser client': true
    , 'browser client cache': true
    , 'browser client minification': false
    , 'browser client etag': false
    , 'browser client gzip': false
    , 'browser client handler': false
    , 'client store expiration': 15
  };

Error:

/Users/dimroc/Repos/git/nko2/node_modules/zappa/node_modules/socket.io/lib/manager.js:727
self.log.debug('served static ' + data.path);
^
TypeError: Cannot call method 'debug' of undefined
at serve (/Users/dimroc/Repos/git/nko2/node_modules/zappa/node_modules/socket.io/lib/manager.js:727:14)
at /Users/dimroc/Repos/git/nko2/node_modules/zappa/node_modules/socket.io/lib/manager.js:746:7
at [object Object]. (fs.js:107:5)
at [object Object].emit (events.js:61:17)
at afterRead (fs.js:878:12)
at wrapper (fs.js:245:17)

@rauchg
Copy link
Contributor

rauchg commented Sep 28, 2011

Sorry we almost always write regression tests, this slipped by.

@dimroc
Copy link
Author

dimroc commented Sep 28, 2011

No worries. Thanks for the quick reply, and again great work on the lib.

@3rd-Eden
Copy link
Contributor

I thinks it's already reported before.. starts searching the issue list

Oh @guille marked that one as closed nvm ;$

This issue was closed.
# 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

3 participants