npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-logging-tools

v1.3.0

Published

[![Build Status](https://travis-ci.org/imranMnts/react-native-logging-tools.svg?branch=develop)](https://travis-ci.org/imranMnts/react-native-logging-tools) ![npm](https://img.shields.io/npm/v/react-native-logging-tools.svg) ![GitHub](https://img.shields.

Downloads

5

Readme

Build Status npm GitHub

React Native Logging Tools

A react native module that lets you:

  • Connect your app to reactotron easily
  • Send logs to multiple services in one time
  • Send crash/error reports to multiple services in one time
  • Register a global error handler which will capture fatal JS exceptions and send a report to your crash reporter libraries
  • Can be plugged to Flipper to display all events sent to different service.

and all this, as easily as possible


Getting started

$ yarn add react-native-logging-tools

or

$ npm install react-native-logging-tools


Status of supported libraries

|Library |Supported |Supported versions |----------------|-------------|-------------| |@react-native-firebase/analytics|:white_check_mark:| >= 6.0.0 |@react-native-firebase/crashlytics|:white_check_mark:| >= 6.0.0 |@sentry/react-native|:white_check_mark:| >= 1.3.0 |instabug-reactnative|:white_check_mark:| >= 9.0.0 |@adobe/react-native-acpanalytics|:white_check_mark:| >= 1.1.6 |@adobe/react-native-acpcore|:white_check_mark:| >= 1.2.4 |tealium-react-native|:white_check_mark:| >= 2.0.2


Usage

Imports

To start, you have to import methods from react-native-logging-tools which will be used.

import {
  init,
  createFirebaseLogger,
  createCrashlyticsLogger,
  createSentryLogger,
  createTealiumLogger,
  createAdobeLogger,
  setupReactotron,
  logEvent,
} from 'react-native-logging-tools';

And the others external libraries to plug to react-native-logging-tools

import Reactotron from 'reactotron-react-native';
import { reactotronRedux } from 'reactotron-redux';
import Instabug from 'instabug-reactnative';
import analytics from '@react-native-firebase/analytics';
import crashlytics from '@react-native-firebase/crashlytics';
import * as Sentry from "@sentry/react-native";
import AsyncStorage from '@react-native-community/async-storage';
import { ACPCore } from '@adobe/react-native-acpcore';
import { addPlugin } from 'react-native-flipper';

Initialization

Before any call to react-native-logging-tools's features, you have to initialize it (eg. in your App.ts or store.ts)

init({
  config: {
    reportJSErrors: !__DEV__,
  },
  analytics: [createFirebaseLogger(analytics())],
  errorReporters: [createCrashlyticsLogger(crashlytics())],
});

:information_source: Documentation and example about initialization steps can be found here.

Features

Loggers

Debug Events

You can call this function where do you want/need to send logs to each plugged libraries to analytics during the initialization step

logEvent('EVENT_NAME', { your_key: 'value', ... });
logDebugEvent('EVENT_NAME', { your_key: 'value', ... });
logWarningEvent('EVENT_NAME', { your_key: 'value', ... });
logNetworkEvent('EVENT_NAME', { your_key: 'value', ... });
logErrorEvent('EVENT_NAME', { your_key: 'value', ... });

:information_source: Documentation and example about logging event can be found here.

If you use react-navigation and you want send to analytics navigation events e.g, you can add logEvent to his event handler (React-navigation docs)

Error Events

You can call this function where do you want/need to send logs to each plugged libraries to errorReporters during the initialization step

recordError('EVENT_NAME', { your_key: 'value', ... });

:information_source: Documentation and example about error reporting can be found here.

Reactotron

:information_source: Documentation and example about Reactotron can be found here.

JS Error handler

:information_source: Documentation and example about Reactotron can be found here.

Flipper

:information_source: Documentation about Flipper can be found here.