Skip to content

Latest commit

 

History

History
46 lines (37 loc) · 1.56 KB

File metadata and controls

46 lines (37 loc) · 1.56 KB

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.