1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Logs - Write logs to program data folder, more consistent & closes #530

This commit is contained in:
Robert 2021-01-21 19:41:38 +01:00
parent de5b8e4458
commit 75b4b72f9f
4 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ namespace Artemis.Core.Ninject
private static readonly ILogger Logger = new LoggerConfiguration() private static readonly ILogger Logger = new LoggerConfiguration()
.Enrich.FromLogContext() .Enrich.FromLogContext()
.Enrich.WithDemystifiedStackTraces() .Enrich.WithDemystifiedStackTraces()
.WriteTo.File("Logs/Artemis log-.txt", .WriteTo.File(Constants.DataFolder + "logs/Artemis log-.txt",
rollingInterval: RollingInterval.Day, rollingInterval: RollingInterval.Day,
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [{Level:u3}] [{SourceContext}] {Message:lj}{NewLine}{Exception}") outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [{Level:u3}] [{SourceContext}] {Message:lj}{NewLine}{Exception}")
.WriteTo.Debug() .WriteTo.Debug()

View File

@ -245,7 +245,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.General
{ {
try try
{ {
Process.Start(Environment.GetEnvironmentVariable("WINDIR") + @"\explorer.exe", Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Logs")); Process.Start(Environment.GetEnvironmentVariable("WINDIR") + @"\explorer.exe", Path.Combine(Constants.DataFolder, "Logs"));
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -59,7 +59,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
{ {
try try
{ {
Process.Start(Environment.GetEnvironmentVariable("WINDIR") + @"\explorer.exe", Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Logs")); Process.Start(Environment.GetEnvironmentVariable("WINDIR") + @"\explorer.exe", Path.Combine(Constants.DataFolder, "Logs"));
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -86,7 +86,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
{ {
try try
{ {
Process.Start(Environment.GetEnvironmentVariable("WINDIR") + @"\explorer.exe", Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Logs")); Process.Start(Environment.GetEnvironmentVariable("WINDIR") + @"\explorer.exe", Path.Combine(Constants.DataFolder, "Logs"));
} }
catch (Exception e) catch (Exception e)
{ {