mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add NOBRIDGE prefix to Venice Metro logs
Summary: ## Context In dev mode, Metro hijacks the JavaScript `console`, and prints all logs into the terminal running the Metro server. ## Problem We have no way to distinguish between Bridge mode and Bridgeless mode logs. This makes it hard to tell catch warnings and errors are coming from bridgeless mode. ## Changes - This diff adds a "NOBRIDGE" prefix to all React Native Metro logs coming from Bridgeless mode. - Bridge mode console logs/warnings/errors are **unaffected**. Changelog: [Internal] Reviewed By: PeteTheHeat Differential Revision: D29152292 fbshipit-source-id: 257b8140327cfd7a0a10aa229bcb88117231e452
This commit is contained in:
committed by
Facebook GitHub Bot
parent
625d9e5090
commit
8a677face4
@@ -118,6 +118,7 @@ const HMRClient: HMRClientNativeInterface = {
|
||||
JSON.stringify({
|
||||
type: 'log',
|
||||
level,
|
||||
mode: global.RN$Bridgeless ? 'NOBRIDGE' : 'BRIDGE',
|
||||
data: data.map(item =>
|
||||
typeof item === 'string'
|
||||
? item
|
||||
|
||||
Reference in New Issue
Block a user