Improve port forwarding logging
Summary: Port forwarding tool was logging the child process object. Made the logging cleaner and more useful. Reviewed By: nikoant Differential Revision: D31608867 fbshipit-source-id: 1c2ae7c926ed4e1b44d51db5415874600acde7ae
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f43ff73591
commit
6589eb86c5
@@ -71,20 +71,26 @@ export class IOSDeviceManager {
|
|||||||
(err, stdout, stderr) => {
|
(err, stdout, stderr) => {
|
||||||
// This happens on app reloads and doesn't need to be treated as an error.
|
// This happens on app reloads and doesn't need to be treated as an error.
|
||||||
console.warn(
|
console.warn(
|
||||||
'Port forwarding app failed to start',
|
'[conn] Port forwarding app failed to start',
|
||||||
err,
|
err,
|
||||||
stdout,
|
stdout,
|
||||||
stderr,
|
stderr,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
console.log('Port forwarding app started', childProcess);
|
console.info(
|
||||||
|
`[conn] Port forwarding app started (portForward: ${port}, multiplexChannelPort: ${multiplexChannelPort})`,
|
||||||
|
);
|
||||||
child.addListener('error', (err) =>
|
child.addListener('error', (err) =>
|
||||||
console.warn('Port forwarding app error', err),
|
console.warn('[conn] Port forwarding app error', err),
|
||||||
);
|
|
||||||
child.addListener('exit', (code) =>
|
|
||||||
console.log(`Port forwarding app exited with code ${code}`),
|
|
||||||
);
|
);
|
||||||
|
child.addListener('exit', (code) => {
|
||||||
|
if (code != 0) {
|
||||||
|
console.warn(`[conn] Port forwarding app exited with code ${code}`);
|
||||||
|
} else {
|
||||||
|
console.log(`[conn] Port forwarding app exited gracefully`);
|
||||||
|
}
|
||||||
|
});
|
||||||
return child;
|
return child;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user