diff --git a/index.js b/index.js index 8fe28387..d27306f1 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,7 @@ import 'react-native-gesture-handler'; import Bugsnag from '@bugsnag/react-native'; import { enableScreens } from 'react-native-screens'; +import { SNLog } from 'snjs'; import { AppRegistry, YellowBox } from 'react-native'; import { App } from './src/App'; @@ -21,6 +22,11 @@ if (__DEV__ === false) { console.error = () => {}; // eslint-disable-next-line no-new new Bugsnag.start(); + SNLog.onError = Bugsnag.notify; + SNLog.onLog = Bugsnag.leaveBreadcrumb; +} else { + SNLog.onLog = console.log; + SNLog.onError = console.error; } enableAndroidFontFix(); diff --git a/package.json b/package.json index bd861f45..caa25d4d 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "react-navigation-header-buttons": "^6.0.0", "sn-textview": "standardnotes/sn-textview#440dbd60eedef4397b6272735e68d4579bb41ac8", "sncrypto": "standardnotes/sncrypto#5f8cd36", - "snjs": "standardnotes/snjs#d101b8e830e255b2d4e20d05d57d2bc0a3b9261d", + "snjs": "standardnotes/snjs#b07f37232029056699e7eae9af0820ca7cf536d1", "standard-notes-rn": "standardnotes/standard-notes-rn#996b016", "styled-components": "^5.2.1" }, diff --git a/yarn.lock b/yarn.lock index 7a5d3e00..5e977885 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7988,9 +7988,9 @@ sncrypto@standardnotes/sncrypto#5f8cd36: version "1.2.0" resolved "https://codeload.github.com/standardnotes/sncrypto/tar.gz/5f8cd369773cec7f342c23ecaa659d932b35cd31" -snjs@standardnotes/snjs#d101b8e830e255b2d4e20d05d57d2bc0a3b9261d: +snjs@standardnotes/snjs#b07f37232029056699e7eae9af0820ca7cf536d1: version "1.0.5" - resolved "https://codeload.github.com/standardnotes/snjs/tar.gz/d101b8e830e255b2d4e20d05d57d2bc0a3b9261d" + resolved "https://codeload.github.com/standardnotes/snjs/tar.gz/b07f37232029056699e7eae9af0820ca7cf536d1" source-map-resolve@^0.5.0: version "0.5.3"