Skip to content

Commit ab00a45

Browse files
rshestfacebook-github-bot
authored andcommitted
Fix minor formatting issue in AppRegistry logging in non-dev builds
Summary: ## Changelog: [Internal] - I was looking at the logs, troubleshooting a non-dev build issue, and noticed a line: ``` I0429 15:56:42.107558 1874554880: Running "MyApplication ``` In `__DEV__` mode this usually continues with `" with ...`, but in release mode the closing quote was missing, which made me think there may be something going on garbling the log messages. Which ultimately was a red herring, and it's just a bad formatting in the message in release mode, which this change fixes. Reviewed By: zeyap Differential Revision: D56704170 fbshipit-source-id: a28604fffec6be74733c8759f59ee52a67a81746
1 parent 8689f56 commit ab00a45

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/react-native/Libraries/ReactNative/AppRegistry.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,8 @@ const AppRegistry = {
196196
displayMode?: number,
197197
): void {
198198
if (appKey !== 'LogBox') {
199-
const logParams = __DEV__
200-
? '" with ' + JSON.stringify(appParameters)
201-
: '';
202-
const msg = 'Running "' + appKey + logParams;
199+
const logParams = __DEV__ ? ` with ${JSON.stringify(appParameters)}` : '';
200+
const msg = `Running "${appKey}"${logParams}`;
203201
infoLog(msg);
204202
BugReporting.addSource(
205203
'AppRegistry.runApplication' + runCount++,

0 commit comments

Comments
 (0)