mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Added logging on fatal crashes
Moved logs to a seperate Logs folder
This commit is contained in:
1 parent
7de98fd02b
commit
d0e369c653
6 files changed
+17
-2
No files matched your search
@@ -8,7 +8,7 @@ namespace Artemis.Core.Ninject
|
||||
private static readonly ILogger _logger = new LoggerConfiguration()
|
||||
.Enrich.FromLogContext()
|
||||
.Enrich.WithDemystifiedStackTraces()
|
||||
.WriteTo.File("Artemis log-.txt",
|
||||
.WriteTo.File("Logs/Artemis log-.txt",
|
||||
rollingInterval: RollingInterval.Day,
|
||||
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] [{SourceContext:l}] {Message:lj}{NewLine}{Exception}")
|
||||
.CreateLogger();
|
||||
|
||||
@@ -94,6 +94,7 @@ namespace Artemis.Core.Services
|
||||
|
||||
private void SurfaceOnException(ExceptionEventArgs args)
|
||||
{
|
||||
_logger.Warning("Surface threw e");
|
||||
throw args.Exception;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user