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

Ember.Logger.debug results in double output #16041

Closed
rwjblue opened this issue Jan 2, 2018 · 0 comments
Closed

Ember.Logger.debug results in double output #16041

rwjblue opened this issue Jan 2, 2018 · 0 comments

Comments

@rwjblue
Copy link
Member

rwjblue commented Jan 2, 2018

This means that on a new Ember app using v3.0.0-beta.1 we see the following output for a debug build:

screenshot

The cause is the boolean logic here:

return console.debug && console.debug(...arguments) || console.info(...arguments); // eslint-disable-line no-console

I believe it should be refactored to:

  debug() {
    if (console.debug) {
      return console.debug(...arguments); // eslint-disable-line no-console
    } else {
      return console.info(...arguments); // eslint-disable-line no-console
    }
  },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants