All Projects → olofd → React Native Device Log

olofd / React Native Device Log

A UI and service for handling/displaying dev log messages on devices

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Native Device Log

Pyrollbar
Error tracking and logging from Python to Rollbar
Stars: ✭ 169 (+76.04%)
Mutual labels:  error-handling, logging
Stacktracey
Parses call stacks. Reads sources. Clean & filtered output. Sourcemaps. Node & browsers.
Stars: ✭ 115 (+19.79%)
Mutual labels:  error-handling, logging
Production Ready Expressjs Server
Express.js server that implements production-ready error handling and logging following latest best practices.
Stars: ✭ 101 (+5.21%)
Mutual labels:  error-handling, logging
Bash Oo Framework
Bash Infinity is a modern standard library / framework / boilerplate for Bash
Stars: ✭ 5,247 (+5365.63%)
Mutual labels:  error-handling, logging
Log Process Errors
Show some ❤️ to Node.js process errors
Stars: ✭ 424 (+341.67%)
Mutual labels:  error-handling, logging
Exceptionless
Exceptionless server and jobs
Stars: ✭ 2,107 (+2094.79%)
Mutual labels:  error-handling, logging
Node Lambda Log
Basic logging mechanism for Node 6.10+ Lambda Functions
Stars: ✭ 115 (+19.79%)
Mutual labels:  error-handling, logging
Tslog
📝 tslog - Expressive TypeScript Logger for Node.js.
Stars: ✭ 321 (+234.38%)
Mutual labels:  error-handling, logging
Traceback with variables
Adds variables to python traceback. Simple, lightweight, controllable. Debug reasons of exceptions by logging or pretty printing colorful variable contexts for each frame in a stacktrace, showing every value. Dump locals environments after errors to console, files, and loggers. Works in Jupyter and IPython. Install with pip or conda.
Stars: ✭ 509 (+430.21%)
Mutual labels:  error-handling, logging
Thoth
An Error Logger for Go
Stars: ✭ 22 (-77.08%)
Mutual labels:  error-handling, logging
Journal
A reasonable logging library for Scala
Stars: ✭ 85 (-11.46%)
Mutual labels:  logging
Vlog
An in-display logging library for Android 📲
Stars: ✭ 86 (-10.42%)
Mutual labels:  logging
Nodejs Logging
Node.js client for Stackdriver Logging: Store, search, analyze, monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services (AWS).
Stars: ✭ 91 (-5.21%)
Mutual labels:  logging
Lumberjack
Chop and cut Angular logs like a professional lumberjack.
Stars: ✭ 93 (-3.12%)
Mutual labels:  logging
Kail
kubernetes log viewer
Stars: ✭ 1,259 (+1211.46%)
Mutual labels:  logging
Xsrv
[mirror] Install and manage self-hosted services/applications, on your own server(s) - ansible collection and utilities
Stars: ✭ 89 (-7.29%)
Mutual labels:  logging
Flogger
A Fluent Logging API for Java
Stars: ✭ 1,257 (+1209.38%)
Mutual labels:  logging
Timbre
Pure Clojure/Script logging library
Stars: ✭ 1,253 (+1205.21%)
Mutual labels:  logging
Lua Log
Asynchronous logging library for Lua
Stars: ✭ 83 (-13.54%)
Mutual labels:  logging
Chromephp
class for logging PHP variables to Google Chrome console
Stars: ✭ 1,339 (+1294.79%)
Mutual labels:  logging

react-native-device-log

Description

A debug-view that prints your debug-messages in a neat listview. Supports different levels of log-messages, complex data (With pretty printing), timers for measuring perf and much more. Adheres to a simple, async, protocol for saving messages where you can plug in your own adapter, or use AsyncStorage from React Native to persist log-messages between session. (Or just use simple session in-memory storage).

Also tracks Connectivity of Device and App-State-changes (Background, Idle, Active).

Will also, if you choose to (flag), track exceptions in your app and in React Native and log linenumbers and methods so you can track crashes in production.

Configure how many messages that should be rendered in the ListView and how many messages should be persisted. All built to be efficent and fast.

Install:

npm install react-native-device-log --save

Example:

/**
 * Sample React Native App width react-native-device-log
 * https://github.com/facebook/react-native
 */
import React, { Component } from 'react';
import  {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  AsyncStorage
} from 'react-native';

//The device-log contains the public api that you will use in your app.
//The LogView is the GUI/Log-list that you can render at desired location //in your app:

import deviceLog, {LogView, InMemoryAdapter} from 'react-native-device-log';

//Call init and set a custom adapter that implements the interface of
//AsyncStorage: getItem, removeItem, setItem.
//By default the log uses a in-memory object, in this example we
//explicitly set the log to use the persistent AsyncStorage instead:

deviceLog.init(AsyncStorage /* You can send new InMemoryAdapter() if you do not want to persist here*/
,{
  //Options (all optional):
  logToConsole : false, //Send logs to console as well as device-log
  logRNErrors : true, // Will pick up RN-errors and send them to the device log
  maxNumberToRender : 2000, // 0 or undefined == unlimited
  maxNumberToPersist : 2000 // 0 or undefined == unlimited
}).then(() => {

  //When the deviceLog has been initialized we can clear it if we want to:
  //deviceLog.clear();

});

//The device-log contains a timer for measuring performance:
deviceLog.startTimer('start-up');

class AwesomeProject extends Component {

  componentDidMount() {
    //Print the current time of the above timer:
    deviceLog.logTime('start-up');

    //Available log messages:
    deviceLog.log("Hello", "world!");
    deviceLog.info("A info message");
    deviceLog.debug("A debug message", {test: "test"});
    deviceLog.success("A success message");

    //Print the current time of the above timer again:
    deviceLog.logTime('start-up');

    //Later stop and remove the timer:
    //Will not print anything.
    deviceLog.stopTimer('start-up');

    setTimeout(() => {
      deviceLog.error("I'm late!!");
    }, 3000);
  }

  render() {
    /*
    inverted: will write the log inverted.
    multiExpanded: means that multiple logmessages
    that are longer then one row can be expanded simultaneously
    timeStampFormat: moment format for timeStamp
    */
    return (
      <LogView inverted={false} multiExpanded={true} timeStampFormat='HH:mm:ss'></LogView>
    );
  }
}

AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].