Skip to content

[JS] Add 'react-native log' #8186

@mkonicek

Description

@mkonicek

Reading logs with React Native should be super easy, right now it's not. You have to:

We should have a command 'react-native log' that prints logs for a running Android emulator / iOS simulator or connected device. For that we'll need to detect whether an Android or iOS simulator is running or a device connected (e.g. using adb devices or something similar on iOS). It seems reasonable to:

  • Start simple and first add two separate commands: react-native log-android, react-native log-ios
  • Later add react-native log that detects what kind of devices are connected and calls either log-android or log-ios.

The command should be implemented as part of the CLI. To get started, see https://github.com/facebook/react-native/blob/master/local-cli/cliEntry.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions