Migrate logger

Summary:
Removed defunct log filtering functionality, but we probably want to rebuild that.
Funny that tsc caught this as non functioning but Flow happily accepted it.

Reviewed By: danielbuechele

Differential Revision: D16690959

fbshipit-source-id: b079dd6faba83ca0c443d00cbb69c8ff95c4fa69
This commit is contained in:
Pascal Hartig
2019-08-09 10:32:36 -07:00
committed by Facebook Github Bot
parent e56d3a4c6d
commit b42abcbb59
9 changed files with 14 additions and 14 deletions

View File

@@ -10,8 +10,8 @@ import {createStore} from 'redux';
import {applyMiddleware} from 'redux'; import {applyMiddleware} from 'redux';
import yargs from 'yargs'; import yargs from 'yargs';
import dispatcher from '../src/dispatcher/index.tsx'; import dispatcher from '../src/dispatcher/index.tsx';
import {init as initLogger} from '../src/fb-stubs/Logger.js';
import reducers from '../src/reducers/index.tsx'; import reducers from '../src/reducers/index.tsx';
import {init as initLogger} from '../src/fb-stubs/Logger.tsx';
import {exportStore, pluginsClassMap} from '../src/utils/exportData.js'; import {exportStore, pluginsClassMap} from '../src/utils/exportData.js';
import { import {
exportMetricsWithoutTrace, exportMetricsWithoutTrace,

View File

@@ -10,7 +10,7 @@ import {Provider} from 'react-redux';
import renderer from 'react-test-renderer'; import renderer from 'react-test-renderer';
import reducers from '../reducers/index.tsx'; import reducers from '../reducers/index.tsx';
import configureStore from 'redux-mock-store'; import configureStore from 'redux-mock-store';
import {init as initLogger} from '../fb-stubs/Logger'; import {init as initLogger} from '../fb-stubs/Logger.tsx';
import BugReporter from '../fb-stubs/BugReporter.tsx'; import BugReporter from '../fb-stubs/BugReporter.tsx';
// create redux store with initial state // create redux store with initial state

View File

@@ -7,7 +7,7 @@
import {Component, type Element, Fragment} from 'react'; import {Component, type Element, Fragment} from 'react';
import {Glyph, Tooltip} from 'flipper'; import {Glyph, Tooltip} from 'flipper';
import {getInstance as getLogger} from '../fb-stubs/Logger'; import {getInstance as getLogger} from '../fb-stubs/Logger.tsx';
import GK from '../fb-stubs/GK.tsx'; import GK from '../fb-stubs/GK.tsx';
type Props = { type Props = {

View File

@@ -15,7 +15,7 @@ import path from 'path';
import {remote} from 'electron'; import {remote} from 'electron';
import {FlipperPlugin} from '../../plugin.tsx'; import {FlipperPlugin} from '../../plugin.tsx';
import reducers from '../../reducers/index.tsx'; import reducers from '../../reducers/index.tsx';
import {init as initLogger} from '../../fb-stubs/Logger.js'; import {init as initLogger} from '../../fb-stubs/Logger.tsx';
import configureStore from 'redux-mock-store'; import configureStore from 'redux-mock-store';
import {TEST_PASSING_GK, TEST_FAILING_GK} from '../../fb-stubs/GK.tsx'; import {TEST_PASSING_GK, TEST_FAILING_GK} from '../../fb-stubs/GK.tsx';
import TestPlugin from './TestPlugin'; import TestPlugin from './TestPlugin';

View File

@@ -5,14 +5,14 @@
* @format * @format
*/ */
import type {TrackType, Logger} from '../fb-interfaces/Logger'; import {TrackType, Logger} from '../fb-interfaces/Logger';
import type {Store} from '../reducers/index.tsx'; import {Store} from '../reducers/index';
import ScribeLogger from './ScribeLogger'; import ScribeLogger from './ScribeLogger';
let instance: ?StubLogger = null; let instance: StubLogger = null;
type Args = { type Args = {
isHeadless?: boolean, isHeadless?: boolean;
}; };
class StubLogger implements Logger { class StubLogger implements Logger {
@@ -22,9 +22,9 @@ class StubLogger implements Logger {
scribeLogger: ScribeLogger; scribeLogger: ScribeLogger;
track(type: TrackType, event: string, data: ?any, plugin?: string) {} track(type: TrackType, event: string, data?: any, plugin?: string) {}
trackTimeSince(mark: string, eventName: ?string) {} trackTimeSince(mark: string, eventName?: string) {}
info(data: any, category: string) {} info(data: any, category: string) {}

View File

@@ -9,7 +9,7 @@ import {Provider} from 'react-redux';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import {ContextMenuProvider} from 'flipper'; import {ContextMenuProvider} from 'flipper';
import GK from './fb-stubs/GK.tsx'; import GK from './fb-stubs/GK.tsx';
import {init as initLogger} from './fb-stubs/Logger'; import {init as initLogger} from './fb-stubs/Logger.tsx';
import App from './App.js'; import App from './App.js';
import BugReporter from './fb-stubs/BugReporter.tsx'; import BugReporter from './fb-stubs/BugReporter.tsx';
import setupPrefetcher from './fb-stubs/Prefetcher.tsx'; import setupPrefetcher from './fb-stubs/Prefetcher.tsx';

View File

@@ -5,7 +5,7 @@
* @format * @format
*/ */
import {getInstance as getLogger} from '../fb-stubs/Logger'; import {getInstance as getLogger} from '../fb-stubs/Logger.tsx';
export function reportInteraction( export function reportInteraction(
componentType: string, componentType: string,

View File

@@ -4,8 +4,8 @@
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
* @format * @format
*/ */
import {getInstance as getLogger} from '../fb-stubs/Logger';
import type {Store, MiddlewareAPI} from '../reducers.tsx'; import type {Store, MiddlewareAPI} from '../reducers.tsx';
import {getInstance as getLogger} from '../fb-stubs/Logger.tsx';
import type {DeviceExport} from '../devices/BaseDevice.tsx'; import type {DeviceExport} from '../devices/BaseDevice.tsx';
import type {State as PluginStates} from '../reducers/pluginStates.tsx'; import type {State as PluginStates} from '../reducers/pluginStates.tsx';
import type {PluginNotification} from '../reducers/notifications.tsx'; import type {PluginNotification} from '../reducers/notifications.tsx';

View File

@@ -5,7 +5,7 @@
* @format * @format
*/ */
import {getInstance} from '../fb-stubs/Logger'; import {getInstance} from '../fb-stubs/Logger.tsx';
export class UnsupportedError extends Error { export class UnsupportedError extends Error {
constructor(message: string) { constructor(message: string) {