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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react_native_log_entries

v1.0.4

Published

Android library for LogEntries

Readme

React Native Log Entries Library for Android

An Android bridge for React Native to use Log Entries

Installation

npm install --save react_native_log_entries

Configuration

Open up android/app/src/main/java/[...]/MainApplication.java

  1. Add import com.cubbuk.reactnativelogentries.ReactNativeLogEntriesPackage; to the imports at the top of the file
import com.cubbuk.reactnativelogentries.ReactNativeLogEntriesPackage;

import java.util.Arrays;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {
  1. Add new ReactNativeLogEntriesPackage() to the list returned by the getPackages() method. Add a comma to the previous item if there's already something there.
@Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
      new ReactNativeLogEntriesPackage()
  );
}
  1. Append the following lines to android/settings.gradle:
include ':react_native_log_entries'
project(':react_native_log_entries').projectDir = new File(rootProject.projectDir,   '../node_modules/react_native_log_entries/android')
  1. Insert the following lines inside the dependencies block in android/app/build.gradle:
compile project(':react_native_log_entries')
  1. Declare the permissions in your Android Manifest
<uses-permission android:name="android.permission.INTERNET" />
  1. Lastly add this maven repo maven { url 'https://jitpack.io' } to application level build.gradle file like following. this repo is already included to library project but it is still required to run the project without any problem, if anyone knows how to avoid it please raise a PR
allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        maven { url 'https://jitpack.io' } //Add this line
    }
}

Usage

All you need is to require the react_native_log_entries module and initialize your logger with your token. You can see the example usage also under Example folder

import {AppRegistry, StyleSheet, Text, View, NativeModules} from "react-native";
import reactNativeLogEntriesLogger from "react_native_log_entries";

export default class Example extends Component {

  constructor(props, context, ...args) {
    super(props, context, ...args);
    const LOG_ENTRIES_SAMPLE_TOKEN = "aa76c166-4dc3-40f1-8de5-60473c31adfe"; // Please change this token with your log entries token
    reactNativeLogEntriesLogger.initializeLogger(LOG_ENTRIES_SAMPLE_TOKEN);// you need to first initalize your logger
    reactNativeLogEntriesLogger.log("sample log message");
  }
  ...
  1. Initialize logger with your token
const LOG_ENTRIES_SAMPLE_TOKEN = "aa76c166-4dc3-40f1-8de5-60473c31adfe"; // Please change this token with your log entries token, it might be unavailable by now
reactNativeLogEntriesLogger.initializeLogger(LOG_ENTRIES_SAMPLE_TOKEN);
  1. String messages can be logged
reactNativeLogEntriesLogger.log("sample log message 2");
  1. For logging objects use logJSON
reactNativeLogEntriesLogger.logJSON({field1: "field1", field2: "field2"});
  1. For adding context info such as logged in user into each message, putToContext method can be used.
reactNativeLogEntriesLogger.putToContext("user", {name: "sampleUser", email: "[email protected]"});
reactNativeLogEntriesLogger.log("sample log message with context by setting second parameter to true", true);
//when context is used message will be part of `message` field on the logs
  1. use removeFromContext method for removing info from context map
reactNativeLogEntriesLogger.removeFromContext("user");
reactNativeLogEntriesLogger.log("user will not be used as it is removed from context", true);

##Credits

This library just tries to wrap Android library of Logentries to enable it to be used from a React Native Project and created solely for learning and experimentation, it can be used or shared by anyone without getting any consent of the author: Project folder structure and documentation is inspired from the famous react-native-camera repository