lundi 27 août 2018

Ember.Logger.log is deprecated and console.info gives 'no-console' build warnings, what to do?

I'm relatively new to Ember development, but keen to do things the right way.

For logging, I used to use Ember.Logger.log('blah'); but that now throws warnings in the console that it's deprecated. There's a link in the warning to https://emberjs.com/deprecations/v3.x#toc_use-console-rather-than-ember-logger, which recommends using console instead.

So I switch to console.info('blah');, but now when I do ember serve there's a bunch of "problems" like:

/Users/mick/Projects/Pop Up Eats/Vendor Website/app/routes/application.js
  22:3  error  Unexpected console statement  no-console
  27:3  error  Unexpected console statement  no-console

✖ 2 problems (2 errors, 0 warnings)

What am I supposed to do? Am I missing something?




Aucun commentaire:

Enregistrer un commentaire