Files
flipper/src/fb-interfaces/Logger.js
Pritesh Nandgaonkar 3401d1ef3c Do not log the cancelled flipper export as a failure
Summary: Currently cancelling the flipper export logs the event as a failure. This diff introduces one more event log type called cancelled.

Reviewed By: jknoxville

Differential Revision: D16711110

fbshipit-source-id: 308b7e64974610dbb17bd14b2425f6d939c99313
2019-08-12 08:10:16 -07:00

29 lines
699 B
JavaScript

/**
* Copyright 2018-present Facebook.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @format
*/
export type LogTypes = 'error' | 'warn' | 'info' | 'debug';
export type TrackType =
| 'duration'
| 'usage'
| 'performance'
| 'success-rate'
| 'operation-cancelled';
export interface Logger {
track(type: TrackType, event: string, data: ?any, plugin?: string): void;
trackTimeSince(mark: string, eventName: ?string): void;
info(data: any, category: string): void;
warn(data: any, category: string): void;
error(data: any, category: string): void;
debug(data: any, category: string): void;
}