Remove Tail

Summary: We no longer need to Tail the logs as we stream the logs over WebSockets (see D37459924 (dcbc7c40bb))

Reviewed By: lblasa

Differential Revision: D37550482

fbshipit-source-id: 92a87f2ba1ecec140bbbb9e71df107341765ad46
This commit is contained in:
Andrey Goncharov
2022-06-30 07:50:06 -07:00
committed by Facebook GitHub Bot
parent f8763f95fa
commit 8c2ef5738e
3 changed files with 0 additions and 164 deletions

View File

@@ -28,12 +28,10 @@ import {
setupPrefetcher,
startFlipperServer,
startServer,
Tail,
} from 'flipper-server-core';
import {
FlipperServer,
getLogger,
LoggerInfo,
isTest,
Logger,
parseEnvironmentVariables,
@@ -168,11 +166,6 @@ async function getFlipperServer(
await server.connect();
await readyForIncomingConnections(server, companionEnv);
} else {
console.info('flipper-server: already running');
const loggerOutputFile = 'flipper-server-log.out';
tailServerLogs(path.join(staticPath, loggerOutputFile));
}
return getExternalServer(socketPath);
@@ -237,18 +230,6 @@ function getStaticDir(appPath: string) {
return _staticPath;
}
function tailServerLogs(logsPath: string) {
console.info('flipper-server logs located at: ', logsPath);
const tail = new Tail(logsPath);
tail.on('line', (line: any) => {
try {
const loggerInfo: LoggerInfo = JSON.parse(line);
console[loggerInfo.type](loggerInfo.msg);
} catch (_) {}
});
tail.watch();
}
// getLogger() is not yet created when the electron app starts.
// we can't create it here yet, as the real logger is wired up to
// the redux store and the rest of the world. So we create a delegating logger