Unify Logger interface usage

Summary:
Unified all imports of Logger. Some were called LogManager before.
Now the fb-stub and the fb variants use the same interface.
Constructor of Logger is no longer exposed so it can't be initialized twice, unless in the case you're explicitly using the fb variant, which has extra functionality.

Reviewed By: danielbuechele

Differential Revision: D14083929

fbshipit-source-id: 9b61a06e1264d5f142b5a9188465c99deaf18193
This commit is contained in:
John Knox
2019-02-14 09:10:58 -08:00
committed by Facebook Github Bot
parent 8ff4c4f56d
commit e33e2d4d06
24 changed files with 56 additions and 34 deletions

View File

@@ -15,13 +15,13 @@ import path from 'path';
import {remote} from 'electron';
import {FlipperPlugin} from '../../plugin';
import reducers from '../../reducers/index.js';
import Logger from '../../fb-stubs/Logger.js';
import {init as initLogger} from '../../fb-stubs/Logger.js';
import configureStore from 'redux-mock-store';
import {TEST_PASSING_GK, TEST_FAILING_GK} from '../../fb-stubs/GK';
import TestPlugin from './TestPlugin';
const mockStore = configureStore([])(reducers(undefined, {type: 'INIT'}));
const logger = new Logger(mockStore);
const logger = initLogger(mockStore);
test('dispatcher dispatches REGISTER_PLUGINS', () => {
dispatcher(mockStore, logger);