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:
Ramanpreet Nara
2021-06-16 12:45:08 -07:00
committed by Facebook GitHub Bot
parent 625d9e5090
commit 8a677face4
+1
View File
@@ -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