mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
[0.76][Fix] Restore Metro log forwarding, change notice to signal future removal (#46815)
This commit is contained in:
@@ -42,9 +42,13 @@ if (__DEV__) {
|
||||
if (!Platform.isTesting) {
|
||||
const HMRClient = require('../Utilities/HMRClient');
|
||||
|
||||
// [0.76 only] When under React Native DevTools, log "JavaScript logs will
|
||||
// be removed from Metro..." warning, and continue to forward logs.
|
||||
if (global.__FUSEBOX_HAS_FULL_CONSOLE_SUPPORT__) {
|
||||
HMRClient.unstable_notifyFuseboxConsoleEnabled();
|
||||
} else if (console._isPolyfilled) {
|
||||
}
|
||||
|
||||
if (console._isPolyfilled) {
|
||||
// We assume full control over the console and send JavaScript logs to Metro.
|
||||
[
|
||||
'trace',
|
||||
|
||||
+6
-5
@@ -153,11 +153,12 @@ const HMRClient: HMRClientNativeInterface = {
|
||||
level: 'info',
|
||||
data: [
|
||||
'\n' +
|
||||
'\x1b[7m' +
|
||||
' \x1b[1mJavaScript logs have moved!\x1b[22m They will now appear in the debugger console. ' +
|
||||
'Tip: Type \x1b[1mj\x1b[22m in the terminal to open the debugger (requires Google Chrome ' +
|
||||
'or Microsoft Edge).' +
|
||||
'\x1b[27m' +
|
||||
'\u001B[7m' +
|
||||
' \u001B[1m💡 JavaScript logs will be removed from Metro in React ' +
|
||||
'Native 0.77!\u001B[22m Please use React Native DevTools as your ' +
|
||||
'default tool. Tip: Type \u001B[1mj\u001B[22m in the terminal to ' +
|
||||
'open (requires Google Chrome or Microsoft Edge).' +
|
||||
'\u001B[27m' +
|
||||
'\n',
|
||||
],
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user