Add isHeadless attribute to scribe messages

Summary:
So we can distinguish between humans and the machines.

We can redirect the traffic to different tables based on this attribute if necessary.

Reviewed By: danielbuechele

Differential Revision: D14025004

fbshipit-source-id: c3a24b5f8a30f24445eaee67843b78ddabfc9d51
This commit is contained in:
John Knox
2019-02-12 08:12:46 -08:00
committed by Facebook Github Bot
parent 029377a849
commit c912dcaf48
3 changed files with 6 additions and 3 deletions

View File

@@ -94,7 +94,7 @@ function startFlipper({
devToolsEnhancer({realtime: true, hostname: 'localhost', port: 8181}),
)
: createStore(reducers);
const logger = new Logger(store);
const logger = new Logger(store, {isHeadless: true});
init(store);
dispatcher(store, logger);

View File

@@ -12,8 +12,12 @@ import ScribeLogger from './ScribeLogger';
var instance: ?LogManager = null;
type Args = {
isHeadless?: boolean,
};
export default class LogManager {
constructor(store: Store) {
constructor(store: Store, args?: Args) {
this.scribeLogger = new ScribeLogger(this);
}

View File

@@ -53,7 +53,6 @@ export type State = {|
plugins: PluginsState,
|};
// $FlowFixMe introduced when removing $Subtype/$Supertype
export type Store = ReduxStore<State, Actions>;
export default combineReducers<_, Actions>({