Reputation: 1011
I've seen this:
How to disable deprecation warnings in Ember.js?
and this:
https://coderwall.com/p/ekugbw/turn-off-ember-deprecation-warnings
and now my code looks like this:
//app.js
import Ember from 'ember';
import Resolver from 'ember-resolver';
import loadInitializers from 'ember/load-initializers';
import config from './config/environment';
Ember.deprecate = () => {};
Ember.warn = function(i){};
and my environment file right now includes this:
EmberENV: {
LOG_STACKTRACE_ON_DEPRECATION: false,
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
}
},
This has gotten me half the results I wanted: the log stacktrace is gone, but I still get the one line deprecation warnings. While I will be using these warnings to as a guideline to refactor in the future, the logging of these deprecation warnings is interfering with my debugging process. I need them gone - temporarily. The source of these deprecations are most likely the libraries I use (legacy-controller, legacy-view, auth0, etc.) but regardless, I need to silence these warnings so that they do not pollute the console.
I'm using Ember 2.3, and I suspect the solutions I found (linked in this question) are for Ember 1.13.
Upvotes: 1
Views: 722
Reputation: 6577
If you want to selectively enable deprecations for future work, I suggest using ember-cli-deprecations-workflow.
You can install it with ember install ember-cli-deprecation-workflow
, and then follow the instructions on the README to populate the whitelist.
Upvotes: 4
Reputation: 5477
You need to stop the loggin of deprecations. Try this:
RAISE_ON_DEPRECATION = false;
Upvotes: 0