We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
crashes
1 parent 5b06432 commit 3d96842Copy full SHA for 3d96842
src/App.axaml.cs
@@ -83,8 +83,12 @@ public static void LogException(Exception ex)
83
if (ex == null)
84
return;
85
86
+ var crashDir = Path.Combine(Native.OS.DataDir, "crashes");
87
+ if (!Directory.Exists(crashDir))
88
+ Directory.CreateDirectory(crashDir);
89
+
90
var time = DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss");
- var file = Path.Combine(Native.OS.DataDir, $"crash_{time}.log");
91
+ var file = Path.Combine(crashDir, $"{time}.log");
92
using var writer = new StreamWriter(file);
93
writer.WriteLine($"Crash::: {ex.GetType().FullName}: {ex.Message}");
94
writer.WriteLine();
0 commit comments