From 7120bf1201af19ce8a5de679a06928f98b11bd49 Mon Sep 17 00:00:00 2001 From: John Knox Date: Tue, 15 Jan 2019 09:39:37 -0800 Subject: [PATCH] Use global logger in InteractionTracker Summary: This tracker isn't really used, but at least now it can benefit from having the sessionId. Reviewed By: passy Differential Revision: D13671367 fbshipit-source-id: 3a79e843e3fabab191d0d7471d56a81b1a91a1e9 --- src/utils/InteractionTracker.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/InteractionTracker.js b/src/utils/InteractionTracker.js index b80c32305..ebf86ce1f 100644 --- a/src/utils/InteractionTracker.js +++ b/src/utils/InteractionTracker.js @@ -5,7 +5,7 @@ * @format */ -import Logger from '../fb-stubs/Logger.js'; +import {getInstance as getLogger} from '../fb-stubs/Logger'; export function reportInteraction( componentType: string, @@ -16,7 +16,6 @@ export function reportInteraction( } class InteractionTracker { - static logger = new Logger(); static numberOfInteractions = 0; type: string; @@ -29,7 +28,7 @@ class InteractionTracker { } interaction = (name: string, data: any) => { - InteractionTracker.logger.track('usage', 'interaction', { + getLogger().track('usage', 'interaction', { interaction: InteractionTracker.numberOfInteractions++, type: this.type, id: this.id,