Support logging in metro plugin

Summary: Show metro logs using the standard logs plugin

Reviewed By: passy

Differential Revision: D19697439

fbshipit-source-id: 032a9a6aa2d987945d2058e0ea494d74e5aa310e
This commit is contained in:
Michel Weststrate
2020-02-11 07:27:00 -08:00
committed by Facebook Github Bot
parent 437ec11ca7
commit dfcfca4370
3 changed files with 125 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ const METRO_DEVICE_ID = 'metro'; // there is always only one activve
async function isMetroRunning(): Promise<boolean> {
try {
// TODO: this prints a log error without connection, fix that
const contents = await (await global.fetch(METRO_URL)).text();
return METRO_MESSAGE.some(msg => contents.includes(msg));
} catch (e) {