Use infoLog instead of console.log
Reviewed By: sahrens Differential Revision: D3304886 fbshipit-source-id: 79d3fd2b833380a18dfbee666f9bd5eaf25b0744
This commit is contained in:
parent
2a67f9b249
commit
0694a2991c
|
@ -17,6 +17,7 @@ var ReactNative = require('ReactNative');
|
||||||
|
|
||||||
var invariant = require('fbjs/lib/invariant');
|
var invariant = require('fbjs/lib/invariant');
|
||||||
var renderApplication = require('renderApplication');
|
var renderApplication = require('renderApplication');
|
||||||
|
const infoLog = require('infoLog');
|
||||||
|
|
||||||
if (__DEV__) {
|
if (__DEV__) {
|
||||||
// In order to use Cmd+P to record/dump perf data, we need to make sure
|
// In order to use Cmd+P to record/dump perf data, we need to make sure
|
||||||
|
@ -87,7 +88,7 @@ var AppRegistry = {
|
||||||
'__DEV__ === ' + String(__DEV__) +
|
'__DEV__ === ' + String(__DEV__) +
|
||||||
', development-level warning are ' + (__DEV__ ? 'ON' : 'OFF') +
|
', development-level warning are ' + (__DEV__ ? 'ON' : 'OFF') +
|
||||||
', performance optimizations are ' + (__DEV__ ? 'OFF' : 'ON');
|
', performance optimizations are ' + (__DEV__ ? 'OFF' : 'ON');
|
||||||
console.log(msg);
|
infoLog(msg);
|
||||||
BugReporting.init();
|
BugReporting.init();
|
||||||
BugReporting.addSource('AppRegistry.runApplication' + runCount++, () => msg);
|
BugReporting.addSource('AppRegistry.runApplication' + runCount++, () => msg);
|
||||||
BugReporting.addFileSource('react_hierarchy.txt', () => require('dumpReactTree')());
|
BugReporting.addFileSource('react_hierarchy.txt', () => require('dumpReactTree')());
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
const BugReportingNativeModule = require('NativeModules').BugReporting;
|
const BugReportingNativeModule = require('NativeModules').BugReporting;
|
||||||
const RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
|
const RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
|
||||||
const Map = require('Map');
|
const Map = require('Map');
|
||||||
|
const infoLog = require('infoLog');
|
||||||
|
|
||||||
import type EmitterSubscription from 'EmitterSubscription';
|
import type EmitterSubscription from 'EmitterSubscription';
|
||||||
|
|
||||||
|
@ -89,7 +90,7 @@ class BugReporting {
|
||||||
for (const [key, callback] of BugReporting._fileSources) {
|
for (const [key, callback] of BugReporting._fileSources) {
|
||||||
fileData[key] = callback();
|
fileData[key] = callback();
|
||||||
}
|
}
|
||||||
console.log('BugReporting extraData:', extraData);
|
infoLog('BugReporting extraData:', extraData);
|
||||||
BugReportingNativeModule &&
|
BugReportingNativeModule &&
|
||||||
BugReportingNativeModule.setExtraData &&
|
BugReportingNativeModule.setExtraData &&
|
||||||
BugReportingNativeModule.setExtraData(extraData, fileData);
|
BugReportingNativeModule.setExtraData(extraData, fileData);
|
||||||
|
|
Loading…
Reference in New Issue