React Native and Expo handler for nightingale
npm install --save nightingale nightingale-react-native-console
:warn: This logger is meant for dev only.
import { configure, Level } from "nightingale";
import { ReactNativeConsoleHandler } from "nightingale-react-native-console";
configure(
process.env.NODE_ENV === "production"
? []
: [
{
pattern: /^app(:|$)/,
handlers: [new ReactNativeConsoleHandler(Level.DEBUG)],
stop: true,
},
{
handlers: [new ReactNativeConsoleHandler(Level.INFO)],
},
],
);
You can use directly nightingale-app-react-native
to get this config and an ready to use appLogger
.