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
Reading logs with React Native should be super easy, right now it's not. You have to:
adb logcaton AndroidWe 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 devicesor something similar on iOS). It seems reasonable to:react-native log-android,react-native log-iosreact-native logthat detects what kind of devices are connected and calls eitherlog-androidorlog-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