Athan Clark
Athan Clark

Reputation: 3980

`react-native log-android` does not show console.log() invocations

How can I view arbitrary javascript logs with the react-native toolchain? Facebook's documentation states react-native log-android should show them, but I am not seeing anything when I write a trivial log such as in index.android.js:

import React, { Component } from 'react'

// ...

console.log("foo") // first log after imports

Would this show up in the adb logcat logs? This is through an emulated device, and oddly enough I can witness other trivial changes (such as, manipulations in font size), so I know my build system "works", but I can't see the logs for some reason.

Also, note that this is using an Ubuntu GNU/Linux development system, not OSX.

Upvotes: 1

Views: 3172

Answers (1)

Santosh Sharma
Santosh Sharma

Reputation: 2248

please run following command in terminal. (where your app directory located)

adb logcat *:S ReactNative:V ReactNativeJS:V

Upvotes: 5

Related Questions