Define global logger instance to be used for all logging
Summary: The advantage of this is that anyone can now log without needing to carry around a Logger object. Primary reason is for making metrics less intrusive in the codebase. Reviewed By: passy Differential Revision: D13671368 fbshipit-source-id: 162ab1351a124683aef13983fc3bcec01385cd1a
This commit is contained in:
committed by
Facebook Github Bot
parent
e71804fe9e
commit
3bcb079f87
@@ -10,7 +10,7 @@ import ReactDOM from 'react-dom';
|
||||
import {ContextMenuProvider} from 'flipper';
|
||||
import {precachedIcons} from './utils/icons.js';
|
||||
import GK from './fb-stubs/GK.js';
|
||||
import Logger from './fb-stubs/Logger.js';
|
||||
import {init as initLogger} from './fb-stubs/Logger';
|
||||
import App from './App.js';
|
||||
import BugReporter from './fb-stubs/BugReporter.js';
|
||||
import {createStore} from 'redux';
|
||||
@@ -26,7 +26,7 @@ const store = createStore(
|
||||
);
|
||||
persistStore(store);
|
||||
|
||||
const logger = new Logger(store);
|
||||
const logger = initLogger(store);
|
||||
const bugReporter = new BugReporter(logger, store);
|
||||
dispatcher(store, logger);
|
||||
GK.init();
|
||||
|
||||
Reference in New Issue
Block a user