From 9187fa23072fc2f7fe5fcfb238f65e800683b360 Mon Sep 17 00:00:00 2001 From: erri120 Date: Fri, 21 Jan 2022 15:44:05 +0100 Subject: [PATCH] Fixes --- Wabbajack.App.Blazor/App.xaml.cs | 9 +++------ Wabbajack.App.Blazor/Pages/Configure.razor.cs | 3 +-- Wabbajack.App.Blazor/wwwroot/index.html | 7 +++++++ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Wabbajack.App.Blazor/App.xaml.cs b/Wabbajack.App.Blazor/App.xaml.cs index 1f4f00fc..2c5ad75e 100644 --- a/Wabbajack.App.Blazor/App.xaml.cs +++ b/Wabbajack.App.Blazor/App.xaml.cs @@ -3,13 +3,11 @@ using System.Windows; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -using NLog; using NLog.Extensions.Logging; using NLog.Targets; using Wabbajack.App.Blazor.State; using Wabbajack.App.Blazor.Utility; using Wabbajack.Services.OSIntegrated; -using LogLevel = Microsoft.Extensions.Logging.LogLevel; namespace Wabbajack.App.Blazor; @@ -34,12 +32,11 @@ public partial class App { FileName = "log.log" }; - var consoleTarget = new ConsoleTarget("console"); - var uiTarget = new MemoryTarget("ui"); - - config.AddRuleForAllLevels(new NullTarget("blackhole"), "Microsoft.AspNetCore.Components.*", true); + var blackholeTarget = new NullTarget("blackhole"); + + config.AddRule(NLog.LogLevel.Trace, NLog.LogLevel.Debug, blackholeTarget, "Microsoft.AspNetCore.Components.*", true); config.AddRuleForAllLevels(fileTarget); config.AddRuleForAllLevels(consoleTarget); config.AddRuleForAllLevels(uiTarget); diff --git a/Wabbajack.App.Blazor/Pages/Configure.razor.cs b/Wabbajack.App.Blazor/Pages/Configure.razor.cs index 839e693d..a32f5a14 100644 --- a/Wabbajack.App.Blazor/Pages/Configure.razor.cs +++ b/Wabbajack.App.Blazor/Pages/Configure.razor.cs @@ -25,7 +25,7 @@ public partial class Configure [Inject] private SystemParametersConstructor ParametersConstructor { get; set; } = default!; [Inject] private IGameLocator GameLocator { get; set; } = default!; [Inject] private SettingsManager SettingsManager { get; set; } = default!; - [Inject] private JSRuntime JSRuntime { get; set; } = default!; + [Inject] private IJSRuntime JSRuntime { get; set; } = default!; private ModList? Modlist => StateContainer.Modlist; @@ -35,7 +35,6 @@ public partial class Configure private string StatusText { get; set; } = string.Empty; private InstallState InstallState => StateContainer.InstallState; - // private LoggerProvider.ILogMessage CurrentLog { get; set; } private const string InstallSettingsPrefix = "install-settings-"; diff --git a/Wabbajack.App.Blazor/wwwroot/index.html b/Wabbajack.App.Blazor/wwwroot/index.html index b8b4fed3..f35708e4 100644 --- a/Wabbajack.App.Blazor/wwwroot/index.html +++ b/Wabbajack.App.Blazor/wwwroot/index.html @@ -32,5 +32,12 @@
+