React Native local logging for development?


#1

It seems like this should be right up front and center, but I can’t seem to find anything about it. The TLDR is that I’m working on React Native in development mode and just want the exceptions to show up in the console or a log without rewriting the catch block. Would love for someone to point me in a good direction.

Typically writing code one will capture exceptions like catch( e => Sentry.captureException(e)) or something to that effect. This is great in production and everything shows up in the dashboard as expect. In development exceptions shouldn’t get to the dashboard and fortunately that is taken care of by default unless you explicitly add Sentry.enableInExpoDevelopment = true. This is also great… Except… Now those exceptions just seem to quietly go to /dev/null. They ARE caught, passed to Sentry and then Sentry says “oh development mode and not enabled, so do nothing”. I’d love to have some way to configure Sentry to say simply log locally for development, but I can’t find anything easily in Sentry docs, googling, or other normal information seeking routes.