diff --git a/Daybreak.API/Logging/WebApplicationBuilderExtensions.cs b/Daybreak.API/Logging/WebApplicationBuilderExtensions.cs index 28944940..e2e0c23b 100644 --- a/Daybreak.API/Logging/WebApplicationBuilderExtensions.cs +++ b/Daybreak.API/Logging/WebApplicationBuilderExtensions.cs @@ -21,7 +21,12 @@ public static class WebApplicationBuilderExtensions theme: AnsiConsoleTheme.Sixteen) .WriteTo.File( outputTemplate: "[{Timestamp:yyyy-MM-dd HH:mm:ss}] {Level:u4}: [{SourceContext}] [{CorrelationVector}] {NewLine}{Message:lj}{NewLine}{Exception}", - path: "Daybreak.API.log") + path: "Daybreak.API.log", + rollingInterval: RollingInterval.Day, + rollOnFileSizeLimit: true, + fileSizeLimitBytes: 50 * 1024 * 1024, + retainedFileCountLimit: 1, + shared: true) .CreateLogger()); builder.Services.AddScoped(); builder.Services.AddOptions()