From ab00a453a827a419ce147d80d2679b324c219143 Mon Sep 17 00:00:00 2001 From: Ruslan Shestopalyuk Date: Mon, 29 Apr 2024 08:55:22 -0700 Subject: [PATCH] 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 --- packages/react-native/Libraries/ReactNative/AppRegistry.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/react-native/Libraries/ReactNative/AppRegistry.js b/packages/react-native/Libraries/ReactNative/AppRegistry.js index 69afb10dc3a..a4b5b732f5f 100644 --- a/packages/react-native/Libraries/ReactNative/AppRegistry.js +++ b/packages/react-native/Libraries/ReactNative/AppRegistry.js @@ -196,10 +196,8 @@ const AppRegistry = { displayMode?: number, ): void { if (appKey !== 'LogBox') { - const logParams = __DEV__ - ? '" with ' + JSON.stringify(appParameters) - : ''; - const msg = 'Running "' + appKey + logParams; + const logParams = __DEV__ ? ` with ${JSON.stringify(appParameters)}` : ''; + const msg = `Running "${appKey}"${logParams}`; infoLog(msg); BugReporting.addSource( 'AppRegistry.runApplication' + runCount++,