Move files to flipper-common
Summary: Moved Logger, sleep, timeout and server contract types to flipper-common packages. Reviewed By: passy Differential Revision: D31475790 fbshipit-source-id: 42d2147698875f9e919ad5250f9953f3bff3ec2d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
cfd44b592a
commit
91d96774f6
44
desktop/flipper-common/src/fb-interfaces/Logger.tsx
Normal file
44
desktop/flipper-common/src/fb-interfaces/Logger.tsx
Normal file
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* 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 LoggerTypes = 'error' | 'warn' | 'info' | 'debug';
|
||||
|
||||
export type LoggerTrackType =
|
||||
| 'duration'
|
||||
| 'usage'
|
||||
| 'performance'
|
||||
| 'success-rate'
|
||||
| 'operation-cancelled';
|
||||
|
||||
export type LoggerArgs = {
|
||||
isTest?: boolean;
|
||||
};
|
||||
|
||||
export interface Logger {
|
||||
track(
|
||||
type: LoggerTrackType,
|
||||
event: string,
|
||||
data?: any,
|
||||
plugin?: string,
|
||||
): void;
|
||||
|
||||
trackTimeSince(
|
||||
mark: string,
|
||||
eventName?: string | null | undefined,
|
||||
data?: any,
|
||||
): 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;
|
||||
}
|
||||
Reference in New Issue
Block a user