Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Logger #563

Merged
merged 2 commits into from
Oct 11, 2011
Merged

Logger #563

merged 2 commits into from
Oct 11, 2011

Conversation

3rd-Eden
Copy link
Contributor

You can now disable logging again using io.disable('log')
Also added support for killing the color output using io.disable('log colors') <-- painful in production

Added tests against it and added another test against static because etags can kill far future headers.

rauchg added a commit that referenced this pull request Oct 11, 2011
@rauchg rauchg merged commit 175fe85 into socketio:master Oct 11, 2011
logger.level = this.get('log level') || -1;
logger.colors = this.get('log colors');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should use isatty()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could use isatty to set the initial value of log colors. This way users can still configure it, but it defaults to the most optimal one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good to me

@alfredwesterveld
Copy link

For me this still shows

info  - socket.io started
info  - socket.io started

Is it possible to also disable this? I tried a little hacking, but without luck?

@3rd-Eden
Copy link
Contributor Author

3rd-Eden commented Feb 6, 2012

@alfredwesterveld

io.listen(app, { log: false });

@alfredwesterveld
Copy link

@3rd-Eden Bingo :)

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

Successfully merging this pull request may close these issues.

4 participants