fixes logging configuration

This commit is contained in:
Philipp Häfelfinger 2023-09-02 12:19:28 +02:00
parent 647a1e44bd
commit 8718b67176
2 changed files with 6 additions and 3 deletions

View File

@ -9,7 +9,10 @@ using PiwigoDirectorySync.Services;
using Spectre.Console.Cli; using Spectre.Console.Cli;
var registrations = new ServiceCollection(); var registrations = new ServiceCollection();
registrations.AddLogging(l => l.AddSimpleConsole(c =>
registrations.AddSingleton(AppSettings.Config);
registrations.AddLogging(l => l.AddConfiguration(AppSettings.Config.GetSection("Logging"))
.AddSimpleConsole(c =>
{ {
c.SingleLine = true; c.SingleLine = true;
c.IncludeScopes = true; c.IncludeScopes = true;

View File

@ -2,8 +2,8 @@
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {
"Default": "Debug", "Default": "Debug",
"System": "Information", "System": "Warning",
"Microsoft": "Information" "Microsoft": "Warning"
} }
}, },
"ConnectionStrings": { "ConnectionStrings": {