Add more logging

Reviewed By: antonk52

Differential Revision: D51154065

fbshipit-source-id: 7532d1e141562adacb9170b112185bd6f730cc5a
This commit is contained in:
Andrey Goncharov
2023-11-09 03:57:59 -08:00
committed by Facebook GitHub Bot
parent f856cedf81
commit 51e149765e
2 changed files with 4 additions and 3 deletions

View File

@@ -118,9 +118,7 @@ export class FlipperServerImpl implements FlipperServer {
keytarModule?: KeytarModule, keytarModule?: KeytarModule,
) { ) {
setFlipperServerConfig(config); setFlipperServerConfig(config);
console.log( console.info('Loaded flipper config: ' + JSON.stringify(config, null, 2));
'Loaded flipper config, paths: ' + JSON.stringify(config.paths, null, 2),
);
setProcessState(config.settings); setProcessState(config.settings);
const server = (this.server = new ServerController(this)); const server = (this.server = new ServerController(this));

View File

@@ -311,6 +311,7 @@ const exportTokenToManifest = async (token: string) => {
const manifestPath = getManifestPath(config); const manifestPath = getManifestPath(config);
try { try {
console.info('Reading manifest at path', manifestPath);
const manifestData = await fs.readFile(manifestPath, { const manifestData = await fs.readFile(manifestPath, {
encoding: 'utf-8', encoding: 'utf-8',
}); });
@@ -319,10 +320,12 @@ const exportTokenToManifest = async (token: string) => {
const newManifestData = JSON.stringify(manifest, null, 4); const newManifestData = JSON.stringify(manifest, null, 4);
console.info('Export token to manifest at path', manifestPath);
await fs.writeFile(manifestPath, newManifestData); await fs.writeFile(manifestPath, newManifestData);
} catch (e) { } catch (e) {
console.error( console.error(
'Unable to export authentication token to manifest, may be non existent.', 'Unable to export authentication token to manifest, may be non existent.',
e,
); );
} }
}; };