Skip to content

Commit 9dedb9f

Browse files
authored
FUND-1643 Improving log file size (#99)
FUnd-1643 Improving log file size
1 parent 288ba13 commit 9dedb9f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/OneGround.ZGW.Common/Logging/SerilogConfig.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Globalization;
1+
using System.Globalization;
22
using System.Reflection;
33
using System.Runtime.InteropServices;
44
using Microsoft.Extensions.Hosting;
@@ -49,9 +49,10 @@ public static IHostApplicationBuilder UseAndConfigureSerilog(this IHostApplicati
4949
a.File(
5050
formatter: new JsonFormatter(renderMessage: true, formatProvider: CultureInfo.CurrentCulture),
5151
path: logPath,
52-
fileSizeLimitBytes: null,
52+
fileSizeLimitBytes: 100 * 1024 * 1024,
53+
rollOnFileSizeLimit: true,
5354
rollingInterval: RollingInterval.Day,
54-
retainedFileCountLimit: 2,
55+
retainedFileCountLimit: 3,
5556
shared: true
5657
)
5758
);

0 commit comments

Comments
 (0)