eae4fe810f
Summary: YellowBox currently assumes the first arg is a printf like format string, this adds support for any arguments so it works more like console in the browser. This also adds `stringifySafe` to format arguments when using printf style. The main annoyance that this fixes is when trying to log a single object it will currently print [object Object] instead of the fully stringified version. **Test plan** Tested a bunch of different log combinations. ```js console.warn({test: 'a'}); // {"test":"a"} (was [object Object] before this patch) console.warn('test %s %s', 1, {}); // test 1 {} console.warn('test %s', 1, {}); // test 1 {} console.warn({}, {}, {}, {}); // {} {} {} {} ``` Closes https://github.com/facebook/react-native/pull/16132 Differential Revision: D5973125 Pulled By: yungsters fbshipit-source-id: fc17105a79473a11c9b1c4728d435fc54fb094bb |
||
---|---|---|
.. | ||
AppContainer.js | ||
AppRegistry.js | ||
I18nManager.js | ||
ReactNativeFeatureFlags.js | ||
UIManager.js | ||
UIManagerStatTracker.js | ||
YellowBox.js | ||
queryLayoutByID.js | ||
renderApplication.js | ||
requireNativeComponent.js | ||
verifyPropTypes.js |