This commit is contained in:
Pat Hartl 2024-06-12 23:20:31 -05:00
parent 1a9aaeb244
commit 7e724dc4c1
3 changed files with 34 additions and 10 deletions

View file

@ -2,6 +2,8 @@
using LANCommander.Client.Services;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using NLog.Extensions.Logging;
using Photino.Blazor;
using Photino.Blazor.CustomWindow.Extensions;
using Photino.NET;
@ -27,6 +29,15 @@ namespace LANCommander.Client
builder.Services.AddAntDesign();
builder.Services.AddDbContext<DbContext, DatabaseContext>();
NLog.GlobalDiagnosticsContext.Set("StoragePath", settings.Debug.LoggingPath);
builder.Services.AddLogging(loggingBuilder =>
{
loggingBuilder.ClearProviders();
loggingBuilder.SetMinimumLevel(settings.Debug.LoggingLevel);
loggingBuilder.AddNLog();
});
#region Register Client
var client = new SDK.Client(settings.Authentication.ServerAddress, settings.Games.DefaultInstallDirectory);