Files
flipper/src/utils/crashReporterUtility.js
Pritesh Nandgaonkar f12226ac00 Just trigger for fatal logs and error logs with tag AndroidRuntime
Summary: This diff updates the check which triggers crash notifications. We got a user feedback that crash reporter used to report non fatal crash too and it used to annoy users with bombardment of crash notifications.

Reviewed By: passy

Differential Revision: D13878272

fbshipit-source-id: 75446f08f806e8f28a6f68953c0a001fd18a7dc0
2019-01-30 06:50:16 -08:00

20 lines
576 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
* @flow
*/
import type {DeviceLogEntry} from '../devices/BaseDevice.js';
export function shouldParseAndroidLog(
entry: DeviceLogEntry,
date: Date,
): boolean {
return (
entry.date.getTime() - date.getTime() > 0 && // The log should have arrived after the device has been registered
((entry.type === 'error' && entry.tag === 'AndroidRuntime') ||
entry.type === 'fatal')
);
}