From 414dd4d5ffa7596232986a3db7566d600ba3fd3f Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Thu, 18 Mar 2021 05:44:10 -0700 Subject: [PATCH] Demote errors in crash reporter Summary: Not fatal errors and actually very, very high-firing. Something about the serialisation here is wrong so I can't tell the exactly number right now. Reviewed By: priteshrnandgaonkar Differential Revision: D27117067 fbshipit-source-id: d9ce8c736ca2228acedeadeb2e7ee6744d766265 --- desktop/plugins/crash_reporter/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/desktop/plugins/crash_reporter/index.tsx b/desktop/plugins/crash_reporter/index.tsx index df4837260..649283ecc 100644 --- a/desktop/plugins/crash_reporter/index.tsx +++ b/desktop/plugins/crash_reporter/index.tsx @@ -288,11 +288,12 @@ function addFileWatcherForiOSCrashLogs( } fs.readFile(filepath, 'utf8', function (err, data) { if (err) { - console.error(err); + console.warn('Failed to read crash file', err); return; } - if (shouldShowiOSCrashNotification(serial, data)) + if (shouldShowiOSCrashNotification(serial, data)) { reportCrash(parseCrashLog(data, deviceOs, null)); + } }); }); }); @@ -450,7 +451,7 @@ export function devicePlugin(client: DevicePluginClient) { const ignore = !crash.name && !crash.reason; const unknownCrashCause = crash.reason === UNKNOWN_CRASH_REASON; if (ignore || unknownCrashCause) { - console.error('Ignored the notification for the crash', crash); + console.warn('Ignored the notification for the crash', crash); return; }