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
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import Server, {SECURE_PORT, INSECURE_PORT} from '../server.js';
|
||||
import LogManager from '../fb-stubs/Logger';
|
||||
import {init as initLogger} from '../fb-stubs/Logger';
|
||||
import reducers from '../reducers/index.js';
|
||||
import configureStore from 'redux-mock-store';
|
||||
import path from 'path';
|
||||
@@ -23,7 +23,8 @@ beforeAll(() => {
|
||||
fs.mkdirSync(flipperDir);
|
||||
}
|
||||
|
||||
server = new Server(new LogManager(), mockStore);
|
||||
const logger = initLogger();
|
||||
server = new Server(logger, mockStore);
|
||||
return server.init();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user