mirror of
https://github.com/tgeorgiadis/quiver-launcher.git
synced 2026-12-06 03:38:02 -05:00
- Introduce Android app - Migrate project files to .NET 10, updating dependencies and workflows. - Migrate project to Avalonia 12 - Refactor App.axaml to include a ResourceDictionary for theme management. - Introduce new styles for gamepad navigation and focus rings. - Implement hosted main view management for better application lifecycle handling. - Remove deprecated MainWindow.Mods.cs file and related code. - Update README to reflect changes in project structure and requirements. Co-authored-by: Cursor <cursoragent@cursor.com>
40 lines
996 B
C#
40 lines
996 B
C#
using System.Diagnostics;
|
|
using System.Text;
|
|
using QuiverLauncher.Services;
|
|
|
|
namespace QuiverLauncher;
|
|
|
|
public static class CrashLog
|
|
{
|
|
public static void LogFromUiThread(string source, Exception ex) => Log(source, ex);
|
|
|
|
public static void Log(string source, Exception ex)
|
|
{
|
|
var message = new StringBuilder();
|
|
message.AppendLine($"[{DateTime.UtcNow:O}] {source}");
|
|
message.AppendLine(ex.ToString());
|
|
|
|
try
|
|
{
|
|
QuiverLauncherPaths.EnsureUserDataRootExists();
|
|
File.AppendAllText(QuiverLauncherPaths.CrashLogPath, message.ToString() + Environment.NewLine);
|
|
}
|
|
catch
|
|
{
|
|
// Best-effort logging only.
|
|
}
|
|
|
|
Debug.WriteLine(message.ToString());
|
|
Trace.WriteLine(message.ToString());
|
|
|
|
try
|
|
{
|
|
Console.Error.WriteLine(message.ToString());
|
|
}
|
|
catch
|
|
{
|
|
// WinExe / Android may have no console attached.
|
|
}
|
|
}
|
|
}
|