Added logging on fatal crashes

Moved logs to a seperate Logs folder
This commit is contained in:
Robert committed 2019-11-05 13:19:39 +01:00
1 parent 3a2bfe7000
commit 143754f784
6 files changed
+17 -2

No files matched your search

@@ -1,7 +1,9 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Windows.Threading;
using Ninject;
using Serilog;
using Stylet;
namespace Artemis.UI.Stylet
@@ -63,5 +65,13 @@ namespace Artemis.UI.Stylet
if (Kernel != null)
Kernel.Dispose();
}
protected override void OnUnhandledException(DispatcherUnhandledExceptionEventArgs e)
{
var logger = Kernel.Get<ILogger>();
logger.Fatal(e.Exception, "Fatal exception, shutting down.");
base.OnUnhandledException(e);
}
}
}