Files
quiver-launcher/CrashLog.cs
T
Thomas GeorgiadisandCursor 2c85fa0370 feat: update Quiver Launcher to support .NET 10 and enhance UI/UX
- 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>
2026-09-01 20:06:33 +10:00

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.
}
}
}