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:
committed by
Facebook Github Bot
parent
8ff4c4f56d
commit
e33e2d4d06
@@ -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);
|
||||
|
||||
@@ -11,7 +11,7 @@ import promiseRetry from 'promise-retry';
|
||||
import {promisify} from 'util';
|
||||
import type {Store} from '../reducers/index.js';
|
||||
import type BaseDevice from '../devices/BaseDevice';
|
||||
import type Logger from '../fb-stubs/Logger.js';
|
||||
import type {Logger} from '../fb-interfaces/Logger.js';
|
||||
import {registerDeviceCallbackOnPlugins} from '../utils/onRegisterDevice.js';
|
||||
import {reportPlatformFailures} from '../utils/metrics';
|
||||
import adbConfig from '../utils/adbConfig';
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
import {remote, ipcRenderer} from 'electron';
|
||||
import type {Store} from '../reducers/index.js';
|
||||
import type Logger from '../fb-stubs/Logger.js';
|
||||
import type {Logger} from '../fb-interfaces/Logger.js';
|
||||
import {parseFlipperPorts} from '../utils/environmentVariables';
|
||||
import {importFileToStore} from '../utils/exportData';
|
||||
import {selectPlugin, userPreferredPlugin} from '../reducers/connections';
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
import type {ChildProcess} from 'child_process';
|
||||
import type {Store} from '../reducers/index.js';
|
||||
import type Logger from '../fb-stubs/Logger.js';
|
||||
import type {Logger} from '../fb-interfaces/Logger.js';
|
||||
import type {DeviceType} from '../devices/BaseDevice';
|
||||
import {RecurringError} from '../utils/errors';
|
||||
import {promisify} from 'util';
|
||||
|
||||
@@ -14,7 +14,7 @@ import server from './server';
|
||||
import notifications from './notifications';
|
||||
import plugins from './plugins';
|
||||
|
||||
import type Logger from '../fb-stubs/Logger.js';
|
||||
import type {Logger} from '../fb-interfaces/Logger.js';
|
||||
import type {Store} from '../reducers/index.js';
|
||||
|
||||
export default (store: Store, logger: Logger) =>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import type {Store} from '../reducers/index.js';
|
||||
import type Logger from '../fb-stubs/Logger.js';
|
||||
import type {Logger} from '../fb-interfaces/Logger.js';
|
||||
import type {PluginNotification} from '../reducers/notifications';
|
||||
import type {FlipperPlugin, FlipperDevicePlugin} from '../plugin.js';
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import type {Store} from '../reducers/index.js';
|
||||
import type Logger from '../fb-stubs/Logger.js';
|
||||
import type {Logger} from '../fb-interfaces/Logger.js';
|
||||
import type {FlipperPlugin, FlipperDevicePlugin} from '../plugin.js';
|
||||
import type {State} from '../reducers/plugins';
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import Server from '../server.js';
|
||||
|
||||
import type {Store} from '../reducers/index.js';
|
||||
import type Logger from '../fb-stubs/Logger.js';
|
||||
import type {Logger} from '../fb-interfaces/Logger.js';
|
||||
import type Client from '../Client.js';
|
||||
import type {UninitializedClient} from '../UninitializedClient';
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import {ipcRenderer} from 'electron';
|
||||
import {performance} from 'perf_hooks';
|
||||
|
||||
import type {Store} from '../reducers/index.js';
|
||||
import type Logger from '../fb-stubs/Logger.js';
|
||||
import type {Logger} from '../fb-interfaces/Logger.js';
|
||||
|
||||
export default (store: Store, logger: Logger) => {
|
||||
let droppedFrames: number = 0;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import type {Store} from '../reducers/index.js';
|
||||
import type Logger from '../fb-stubs/Logger.js';
|
||||
import type {Logger} from '../fb-interfaces/Logger.js';
|
||||
|
||||
import WindowsDevice from '../devices/WindowsDevice';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user