2019-08-23 13:18:47 +00:00
|
|
|
import { Client } from 'bugsnag-react-native';
|
2019-05-28 13:03:08 +00:00
|
|
|
import firebase from 'react-native-firebase';
|
2019-08-23 13:18:47 +00:00
|
|
|
import config from '../../config';
|
2018-05-18 17:55:08 +00:00
|
|
|
|
2019-08-23 13:18:47 +00:00
|
|
|
const bugsnag = new Client(config.BUGSNAG_API_KEY);
|
|
|
|
|
|
|
|
export const { analytics } = firebase;
|
|
|
|
export const loggerConfig = bugsnag.config;
|
|
|
|
export const { leaveBreadcrumb } = bugsnag;
|
|
|
|
|
2019-08-31 19:22:58 +00:00
|
|
|
export default (e) => {
|
|
|
|
if (e instanceof Error) {
|
|
|
|
bugsnag.notify(e);
|
|
|
|
} else {
|
|
|
|
console.log(e);
|
|
|
|
}
|
|
|
|
};
|