Logging
This commit is contained in:
parent
1a9aaeb244
commit
7e724dc4c1
3 changed files with 34 additions and 10 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue