diff --git a/PiwigoDirectorySync/Program.cs b/PiwigoDirectorySync/Program.cs index e98111f..e73c805 100644 --- a/PiwigoDirectorySync/Program.cs +++ b/PiwigoDirectorySync/Program.cs @@ -14,14 +14,13 @@ using Spectre.Console.Cli; const string outputTemplateConsole = "[{Timestamp:HH:mm:ss} {Level}] {SourceContext}: {Message}{NewLine}"; const string outputTemplateFile = "[{Timestamp:HH:mm:ss} {Level}] {SourceContext}{NewLine}{Message}{NewLine}{NewLine}{Exception}{NewLine}"; -Log.Logger = new LoggerConfiguration() - .MinimumLevel.Debug() +Log.Logger = new LoggerConfiguration().MinimumLevel.Debug() .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) .MinimumLevel.Override("System", LogEventLevel.Warning) .MinimumLevel.Override("Piwigo.Client", LogEventLevel.Warning) .Enrich.FromLogContext() .WriteTo.Console(LogEventLevel.Information, outputTemplateConsole, theme: AnsiConsoleTheme.Code) - .WriteTo.File("logs/PiwigoDirectorySync.txt", LogEventLevel.Debug, outputTemplate:outputTemplateFile, rollingInterval: RollingInterval.Day) + .WriteTo.File("logs/PiwigoDirectorySync.txt", LogEventLevel.Debug, outputTemplateFile, rollingInterval: RollingInterval.Day, retainedFileCountLimit: 90) .CreateLogger(); var registrations = new ServiceCollection();