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-debulog

v1.0.1

Published

Empower React Native debugging with react-native-debulog – customizable logs for improved development.

Downloads

102

Readme

react-native-debulog

react-native-debulog is a versatile and customizable logging library for React Native applications, allowing you to enhance your debugging and logging capabilities with ease.

Installation

To install react-native-debulog, you can use npm or yarn:

npm install react-native-debulog

or

yarn add react-native-debulog

Usage

Import the library and its functions into your React component file:

import * as React from 'react';

import { StyleSheet, View } from 'react-native';
import {
  log,
  logDebug,
  logError,
  logInfo,
  logSuccess,
  logWarning,
  setLogOptions,
} from '../../src/index';

export default function App() {
  React.useEffect(() => {
    setLogOptions({
      hideLogs: false, // you can hide all logs on production if you want __DEV__
      hasArrow: true,
      showBadge: true,
      hasJsonStringify: true,
      stringifySpaces: 2,
    });
    logSuccess('This is a success message');
    logSuccess('This is a success message with a object', {
      message: 'This is a success message with a object',
      name: 'Debulog',
    });

    logError('This is an error message');
    logError('This is an error message with a object', {
      name: 'Debulog',
      version: '1.0.0',
    });
    logWarning('This is a warning message');
    logWarning('This is a warning message with a object', {
      name: 'Debulog',
      version: '1.0.0',
    });
    logInfo('This is an info message');
    logInfo('This is an info message with a object', {
      name: 'Debulog',
      version: '1.0.0',
      author: 'Gustavo Bacellar',
    });
    logDebug('This is a debug message');
    logDebug('This is a debug message with a object', {
      name: 'Debulog',
      version: '1.0.0',
    });
    log('This is a default message');
    log('This is a default message with a object', {
      name: 'Debulog',
      version: '1.0.0',
    });
  }, []);

  return <View style={styles.container} />;
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  },
  box: {
    width: 60,
    height: 60,
    marginVertical: 20,
  },
});

Customization

You can customize the log options by using the setLogOptions function:

setLogOptions({
  hideLogs: false, // you can hide all logs on production if you want __DEV__
  hasArrow: true,
  showBadge: true,
  hasJsonStringify: true,
  stringifySpaces: 2,
});

Preview

Preview Debulog

Contribution Guide

Welcome to the project! We're delighted that you want to contribute. This guide will walk you through how to do so effectively.

Author and Contributors

This project is maintained by Gustavo Bacellar.

If you would like to contribute to this project, please follow the Contribution Guidelines.

Contribution Guidelines

  1. Fork the Repository

    Click the "Fork" button in the top right corner of this page to create a copy of the repository in your own GitHub account.

  2. Clone the Repository

    Clone your fork locally to your machine:

    git clone https://github.com/gustavobacellarladeira/react-native-debulog.git
    ``

Support Our Project

Why Donate?

Our project is powered by the generous support of people like you. Your donations help us continue our mission and make ongoing improvements.

How You Can Help

  • Click the "Donate" button above to make a quick and secure donation.
  • Consider a monthly donation to support the project continuously.
  • Share our project with friends and family to expand our reach.

Your Support Makes a Difference

Every donation, no matter how small, makes a significant impact on our project. We deeply appreciate your ongoing support.

Support Now

License

This project is licensed under the MIT License - see the LICENSE file for details.