Use infoLog instead of console.log

Reviewed By: sahrens

Differential Revision: D3304886

fbshipit-source-id: 79d3fd2b833380a18dfbee666f9bd5eaf25b0744
This commit is contained in:
Alexander Blom 2016-05-17 12:42:17 -07:00 committed by Facebook Github Bot 1
parent 2a67f9b249
commit 0694a2991c
2 changed files with 4 additions and 2 deletions

View File

@ -17,6 +17,7 @@ var ReactNative = require('ReactNative');
var invariant = require('fbjs/lib/invariant');
var renderApplication = require('renderApplication');
const infoLog = require('infoLog');
if (__DEV__) {
// 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__) +
', development-level warning are ' + (__DEV__ ? 'ON' : 'OFF') +
', performance optimizations are ' + (__DEV__ ? 'OFF' : 'ON');
console.log(msg);
infoLog(msg);
BugReporting.init();
BugReporting.addSource('AppRegistry.runApplication' + runCount++, () => msg);
BugReporting.addFileSource('react_hierarchy.txt', () => require('dumpReactTree')());

View File

@ -14,6 +14,7 @@
const BugReportingNativeModule = require('NativeModules').BugReporting;
const RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
const Map = require('Map');
const infoLog = require('infoLog');
import type EmitterSubscription from 'EmitterSubscription';
@ -89,7 +90,7 @@ class BugReporting {
for (const [key, callback] of BugReporting._fileSources) {
fileData[key] = callback();
}
console.log('BugReporting extraData:', extraData);
infoLog('BugReporting extraData:', extraData);
BugReportingNativeModule &&
BugReportingNativeModule.setExtraData &&
BugReportingNativeModule.setExtraData(extraData, fileData);