Remove [conn] from log
Summary: Not really a connectivity related log, so removed [conn] from it. Reviewed By: passy Differential Revision: D48266546 fbshipit-source-id: e384301d6301940366b594b4bc612349cc2264ce
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9e2615cd80
commit
bdbf5794ee
@@ -134,7 +134,7 @@ export default abstract class AbstractClient extends EventEmitter {
|
|||||||
'Fetch plugin timeout. Unresponsive client?',
|
'Fetch plugin timeout. Unresponsive client?',
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn('[conn] Fetch plugin error', e);
|
console.warn('Failed to fetch plugin', e);
|
||||||
}
|
}
|
||||||
this.plugins = new Set(response?.plugins ?? []);
|
this.plugins = new Set(response?.plugins ?? []);
|
||||||
console.info('AbstractClient.loadPlugins', this.query, [...this.plugins]);
|
console.info('AbstractClient.loadPlugins', this.query, [...this.plugins]);
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ function handleServerStateChange({
|
|||||||
error?: string;
|
error?: string;
|
||||||
}) {
|
}) {
|
||||||
if (state === 'error') {
|
if (state === 'error') {
|
||||||
console.warn(`[conn] Flipper server state -> ${state}`, error);
|
console.warn(`Flipper server state -> ${state}`, error);
|
||||||
if (error?.includes('EADDRINUSE')) {
|
if (error?.includes('EADDRINUSE')) {
|
||||||
handeEADDRINUSE(error);
|
handeEADDRINUSE(error);
|
||||||
} else {
|
} else {
|
||||||
@@ -194,7 +194,7 @@ function handleServerStateChange({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.info(`[conn] Flipper server state -> ${state}`);
|
console.info(`Flipper server state -> ${state}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -348,14 +348,14 @@ export async function handleClientConnected(
|
|||||||
}
|
}
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
`[conn] Searching matching device ${query.device_id} for client ${query.app}...`,
|
`Searching matching device ${query.device_id} for client ${query.app}...`,
|
||||||
);
|
);
|
||||||
const device =
|
const device =
|
||||||
getDeviceBySerial(store.getState(), query.device_id) ??
|
getDeviceBySerial(store.getState(), query.device_id) ??
|
||||||
(await findDeviceForConnection(store, query.app, query.device_id).catch(
|
(await findDeviceForConnection(store, query.app, query.device_id).catch(
|
||||||
(e) => {
|
(e) => {
|
||||||
console.warn(
|
console.warn(
|
||||||
`[conn] Failed to find device '${query.device_id}' while connection app '${query.app}'`,
|
`Failed to find device '${query.device_id}' while connection app '${query.app}'`,
|
||||||
e,
|
e,
|
||||||
);
|
);
|
||||||
const key = `device-find-failure-${query.device_id}`;
|
const key = `device-find-failure-${query.device_id}`;
|
||||||
@@ -408,19 +408,17 @@ export async function handleClientConnected(
|
|||||||
await timeout(
|
await timeout(
|
||||||
30 * 1000,
|
30 * 1000,
|
||||||
client.init(),
|
client.init(),
|
||||||
`[conn] Failed to initialize client ${query.app} on ${query.device_id} in a timely manner`,
|
`Failed to initialize client ${query.app} on ${query.device_id} in a timely manner`,
|
||||||
);
|
|
||||||
console.log(
|
|
||||||
`[conn] ${query.app} on ${query.device_id} connected and ready.`,
|
|
||||||
);
|
);
|
||||||
|
console.log(`${query.app} on ${query.device_id} connected and ready.`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof NoLongerConnectedToClientError) {
|
if (e instanceof NoLongerConnectedToClientError) {
|
||||||
console.warn(
|
console.warn(
|
||||||
`[conn] Client ${query.app} on ${query.device_id} disconnected while initialising`,
|
`Client ${query.app} on ${query.device_id} disconnected while initialising`,
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.warn(`[conn] Failed to handle client connected: ${e}`);
|
console.warn(`Failed to handle client connected: ${e}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -465,7 +463,7 @@ async function findDeviceForConnection(
|
|||||||
(device) => device.serial === serial,
|
(device) => device.serial === serial,
|
||||||
);
|
);
|
||||||
if (matchingDevice) {
|
if (matchingDevice) {
|
||||||
console.log(`[conn] Found device for: ${clientId} on ${serial}.`);
|
console.log(`Found device for: ${clientId} on ${serial}.`);
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
resolve(matchingDevice);
|
resolve(matchingDevice);
|
||||||
unsubscribe();
|
unsubscribe();
|
||||||
|
|||||||
Reference in New Issue
Block a user