如何在终端中查看React Native日志?

时间:2017-10-03 20:06:44

标签: ios react-native

在iOS模拟器中运行我的React Native应用程序并从开发人员菜单中选择“Debug JS Remotely”时,我可以在Chrome开发人员工具中看到我的所有console.log语句。但是,我发现这非常慢 - 它非常糟糕,占用了大量的内存。我更愿意只在终端窗口看到我的日志。

the documentation我应该能够运行react-native log-ios但是当我这样做时,我唯一看到的是:

$ react-native log-ios
Scanning 682 folders for symlinks in /Users/admin/Documents/projects/xxx/node_modules (8ms)
NOTE:  Most system logs have moved to a new logging system.  See log(1) for more information.
$diagnosticd[52162] <Notice>: dispatch_io_write error: 89 (Operation canceled)
$diagnosticd[52162] <Notice>: reflect channel created for fd 5
$budd[66301] <Error>: objc[66301]: Class BYBuddyDaemonCloudSyncClient is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/SetupAssistant.framework/SetupAssistant (0x10aba8820) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/SetupAssistant.framework/budd (0x10a6911f8). One of the two will be used. Which one is undefined.
$diagnosticd[52162] <Notice>: dispatch_io_write error: 32 (Broken pipe)
--- last message repeated 1 time ---

我的日志实际上都没有显示出来。

编辑:对于那些熟悉create-react-native-app和世博会的人来说,这正是我希望我的日志显示的方式。

0 个答案:

没有答案