Move crash reporting listener to the server
Summary: Changelog: Move crash watcher to the server. Add 'device-crash' event. Add 'device-start-crash-watcher', 'device-stop-crash-watcher' commands. Add 'onDeviceCrash' method to Plugin Client. Reviewed By: mweststrate Differential Revision: D33089810 fbshipit-source-id: ed62ee7c1129e5e25af18b444744b0796f567b72
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9fd45b96d2
commit
731749b41f
@@ -11,9 +11,10 @@ import {SandyPluginDefinition} from './SandyPluginDefinition';
|
||||
import {BasePluginInstance, BasePluginClient} from './PluginBase';
|
||||
import {FlipperLib} from './FlipperLib';
|
||||
import {Atom, ReadOnlyAtom} from '../state/atom';
|
||||
import {DeviceOS, DeviceType, DeviceLogEntry} from 'flipper-common';
|
||||
import {DeviceOS, DeviceType, DeviceLogEntry, CrashLog} from 'flipper-common';
|
||||
|
||||
export type DeviceLogListener = (entry: DeviceLogEntry) => void;
|
||||
export type CrashLogListener = (crash: CrashLog) => void;
|
||||
|
||||
export interface Device {
|
||||
readonly isArchived: boolean;
|
||||
@@ -24,7 +25,9 @@ export interface Device {
|
||||
readonly connected: Atom<boolean>;
|
||||
executeShell(command: string): Promise<string>;
|
||||
addLogListener(callback: DeviceLogListener): Symbol;
|
||||
addCrashListener(callback: CrashLogListener): Symbol;
|
||||
removeLogListener(id: Symbol): void;
|
||||
removeCrashListener(id: Symbol): void;
|
||||
executeShell(command: string): Promise<string>;
|
||||
forwardPort(local: string, remote: string): Promise<boolean>;
|
||||
clearLogs(): Promise<void>;
|
||||
|
||||
Reference in New Issue
Block a user