Add a menu item to export Flipper logs to a file
Summary: CHANGELOG: Add Flipper logs export to file Allows users to export their Flipper logs with a single click. The export always includes all log levels but debug. Reviewed By: antonk52 Differential Revision: D37485571 fbshipit-source-id: 82b02132794da30b255e6178db4a17c1ba8091ee
This commit is contained in:
committed by
Facebook GitHub Bot
parent
dcbc7c40bb
commit
47956087ee
@@ -62,6 +62,7 @@ import {
|
||||
showOpenDialog,
|
||||
startFileExport,
|
||||
startLinkExport,
|
||||
startLogsExport,
|
||||
} from '../utils/exportData';
|
||||
import {openDeeplinkDialog} from '../deeplink';
|
||||
import {css} from '@emotion/css';
|
||||
@@ -224,6 +225,11 @@ function ExtrasMenu() {
|
||||
() => startFileExport(store.dispatch),
|
||||
[store.dispatch],
|
||||
);
|
||||
const startLogsExportTracked = useTrackedCallback(
|
||||
'Logs export',
|
||||
startLogsExport,
|
||||
[],
|
||||
);
|
||||
const startLinkExportTracked = useTrackedCallback(
|
||||
'Link export',
|
||||
() => startLinkExport(store.dispatch),
|
||||
@@ -259,6 +265,11 @@ function ExtrasMenu() {
|
||||
key="extras"
|
||||
title={<LeftRailButton icon={<SettingOutlined />} small />}
|
||||
className={submenu}>
|
||||
{canFileExport() ? (
|
||||
<Menu.Item key="exportLogs" onClick={startLogsExportTracked}>
|
||||
Export Flipper logs
|
||||
</Menu.Item>
|
||||
) : null}
|
||||
{canOpenDialog() ? (
|
||||
<Menu.Item key="importFlipperFile" onClick={startImportTracked}>
|
||||
Import Flipper file
|
||||
|
||||
Reference in New Issue
Block a user