nightingale-react-native-console

React Native and Expo handler for nightingale

Usage no npm install needed!

<script type="module">
  import nightingaleReactNativeConsole from 'https://cdn.skypack.dev/nightingale-react-native-console';
</script>

README

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.