Merge pull request #398 from daemitus/rollingLogSiink

This commit is contained in:
goaaats 2021-07-12 23:24:22 +02:00 committed by GitHub
commit 2665679b41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,7 +104,7 @@ namespace Dalamud
levelSwitch.MinimumLevel = configuration.LogLevel;
#endif
Log.Logger = new LoggerConfiguration()
.WriteTo.Async(a => a.File(logPath))
.WriteTo.Async(a => a.File(logPath, fileSizeLimitBytes: 5 * 1024 * 1024, rollOnFileSizeLimit: true))
.WriteTo.Sink(SerilogEventSink.Instance)
.MinimumLevel.ControlledBy(levelSwitch)
.CreateLogger();