Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

JessicaYeh/react-native-native-log

Open more actions menu

Repository files navigation

react-native-native-log

A React Native log function that under the hood calls NSLog() on iOS and Log.i() on Android.

A potential use case for this library is to be able to read logs with an E2E UI testing tool like Appium.

Installation

npm install react-native-native-log

Usage

import NativeLog from "react-native-native-log";

// ...

NativeLog.log('hello world'); // hello world
// or
NativeLog.logWithTag('my-tag', 'hello world'); // [my-tag] hello world

Example app

To get started with the project, run yarn bootstrap in the root directory to install the required dependencies for each package:

yarn bootstrap

iOS

To run the example app on iOS:

yarn example ios

In order to see the native logs (they won't show in the normal console log in the Metro window):

  • Run the iOS app from example/ios/NativeLogExample.xcworkspace in Xcode and look at the log window there

Android

To run the example app on Android:

yarn example android

In order to see the native logs (they won't show in the normal console log in the Metro window):

  • run adb logcat

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

About

A React Native log function that under the hood calls NSLog() on iOS and Log.i() on Android

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.