Remove duplicate Logger in headless/index.js

Summary:
init() was being misused. This returns a Logger instance, so there's no need to create one as well.
This was a problem because different arguments were being passed to each (isHeadless in this case).

Reviewed By: passy

Differential Revision: D14083320

fbshipit-source-id: b0001a2b3cdd914609d54382575e3b0fa4b5f077
This commit is contained in:
John Knox
2019-02-14 09:10:58 -08:00
committed by Facebook Github Bot
parent b9db2411cf
commit 8ff4c4f56d
2 changed files with 3 additions and 4 deletions

View File

@@ -8,7 +8,7 @@
import {createStore} from 'redux';
import reducers from '../src/reducers/index.js';
import dispatcher from '../src/dispatcher/index.js';
import Logger, {init} from '../src/fb-stubs/Logger.js';
import {init as initLogger} from '../src/fb-stubs/Logger.js';
import path from 'path';
// $FlowFixMe this file exist, trust me, flow!
import setup from '../static/setup.js';
@@ -94,8 +94,7 @@ function startFlipper({
devToolsEnhancer({realtime: true, hostname: 'localhost', port: 8181}),
)
: createStore(reducers);
const logger = new Logger(store, {isHeadless: true});
init(store);
const logger = initLogger(store, {isHeadless: true});
dispatcher(store, logger);
process.on('SIGINT', () => {