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 yargs from 'yargs';
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 {init as initLogger} from '../src/fb-stubs/Logger.tsx';
import {exportStore, pluginsClassMap} from '../src/utils/exportData.js';
import {
exportMetricsWithoutTrace,

View File

@@ -10,7 +10,7 @@ import {Provider} from 'react-redux';
import renderer from 'react-test-renderer';
import reducers from '../reducers/index.tsx';
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';
// create redux store with initial state

View File

@@ -7,7 +7,7 @@
import {Component, type Element, Fragment} from 'react';
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';
type Props = {

View File

@@ -15,7 +15,7 @@ import path from 'path';
import {remote} from 'electron';
import {FlipperPlugin} from '../../plugin.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 {TEST_PASSING_GK, TEST_FAILING_GK} from '../../fb-stubs/GK.tsx';
import TestPlugin from './TestPlugin';

View File

@@ -5,14 +5,14 @@
* @format
*/
import type {TrackType, Logger} from '../fb-interfaces/Logger';
import type {Store} from '../reducers/index.tsx';
import {TrackType, Logger} from '../fb-interfaces/Logger';
import {Store} from '../reducers/index';
import ScribeLogger from './ScribeLogger';
let instance: ?StubLogger = null;
let instance: StubLogger = null;
type Args = {
isHeadless?: boolean,
isHeadless?: boolean;
};
class StubLogger implements Logger {
@@ -22,9 +22,9 @@ class StubLogger implements Logger {
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) {}

View File

@@ -9,7 +9,7 @@ import {Provider} from 'react-redux';
import ReactDOM from 'react-dom';
import {ContextMenuProvider} from 'flipper';
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 BugReporter from './fb-stubs/BugReporter.tsx';
import setupPrefetcher from './fb-stubs/Prefetcher.tsx';

View File

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

View File

@@ -4,8 +4,8 @@
* LICENSE file in the root directory of this source tree.
* @format
*/
import {getInstance as getLogger} from '../fb-stubs/Logger';
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 {State as PluginStates} from '../reducers/pluginStates.tsx';
import type {PluginNotification} from '../reducers/notifications.tsx';

View File

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