Sentry tools and logger
yarn add sentry-toolkit
npm install sentry-toolkit --save
In the root of your project
There are 2 variables you have to set:
- You get that from Sentry
- Example: development, qa, staging, production
Bind Sentry to the error console
Everytime an exception or error is sent to the error console, it will also be sent to your sentry account.
This should be executed very early in your application; even one of the first things.
Simple Sentry logging
You can also send simple log statements to your sentry account.
;# send an error messagelog;# send an exceptionlog;# send an info messagelog;# send a warning messagelog;