Skip to content

Latest commit

 

History

History

nightingale-react-native-console

nightingale-react-native-console

React Native and Expo handler for nightingale

Install

npm install --save nightingale nightingale-react-native-console

Usage

: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.