mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-02 11:13:29 +00:00
Reduce production logs + button on error page for logs (#1565)
* reduce prod logs * Open logs dir button on error page
This commit is contained in:
parent
25fa1f0974
commit
39744b5c55
|
@ -169,7 +169,12 @@ impl Node {
|
|||
.with(
|
||||
tracing_fmt::Subscriber::new()
|
||||
.with_ansi(false)
|
||||
.with_writer(logfile),
|
||||
.with_writer(logfile)
|
||||
.with_filter(
|
||||
EnvFilter::builder()
|
||||
.from_env()?
|
||||
.add_directive("info".parse()?),
|
||||
),
|
||||
)
|
||||
.with(
|
||||
tracing_fmt::Subscriber::new()
|
||||
|
|
|
@ -6,6 +6,7 @@ import { Button, Dialogs } from '@sd/ui';
|
|||
|
||||
import { showAlertDialog } from './components';
|
||||
import { useOperatingSystem, useTheme } from './hooks';
|
||||
import { usePlatform } from './util/Platform';
|
||||
|
||||
export function RouterErrorBoundary() {
|
||||
const error = useRouteError();
|
||||
|
@ -56,6 +57,7 @@ export function ErrorPage({
|
|||
useTheme();
|
||||
const debug = useDebugState();
|
||||
const os = useOperatingSystem();
|
||||
const platform = usePlatform();
|
||||
const isMacOS = os === 'macOS';
|
||||
|
||||
const resetHandler = () => {
|
||||
|
@ -97,11 +99,19 @@ export function ErrorPage({
|
|||
Reload
|
||||
</Button>
|
||||
)}
|
||||
{sendReportBtn && (
|
||||
<Button variant="gray" className="mt-2" onClick={sendReportBtn}>
|
||||
Send report
|
||||
<Button
|
||||
variant="gray"
|
||||
className="mt-2"
|
||||
onClick={() => (sendReportBtn ? sendReportBtn() : captureException(message))}
|
||||
>
|
||||
Send report
|
||||
</Button>
|
||||
{platform.openLogsDir && (
|
||||
<Button variant="gray" className="mt-2" onClick={platform.openLogsDir}>
|
||||
Open Logs
|
||||
</Button>
|
||||
)}
|
||||
|
||||
{(errorsThatRequireACoreReset.includes(message) ||
|
||||
message.startsWith('NodeError::FailedToInitializeConfig') ||
|
||||
message.startsWith('failed to initialize library manager')) && (
|
||||
|
|
Loading…
Reference in a new issue