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
This commit is contained in:
committed by
Facebook Github Bot
parent
3bcb079f87
commit
7120bf1201
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user