ember-rollbar
v0.0.12
Published
The default blueprint for ember-cli addons.
Downloads
6
Readme
Ember Addon for Rollbar.
By default, Ember.onerror and rejected promises log to Rollbar.
Installing
ember install ember-rollbar
Usage
Set config rollbar in appllication. It uses for configuring Rollbar.
ENV: {
APP: {
rollbar: {
enabled: true,
captureUncaught: true,
payload: {
environment
}
}
}
}
You can inject rollbar and get access to configure method and rollbar instance.
// component.js
import Ember from 'ember';
const {
Component,
inject: { service }
} = Ember;
export default Component.extend({
rollbarService: service('rollbar'),
didInserElement() {
this._super();
get(this, 'rollbarService.rollbar').error('Error text.');
get(this, 'rollbarService').configure({ enabled: false });
}
});
More Info
Please check out Rollbar JavaScript docs