I have an Enterprise Logging programmatic configuration that looks like this:
builder.ConfigureLogging()
.LogToCategoryNamed("General")
.WithOptions.SetAsDefaultCategory()
.SendTo.RollingFile("Rolling Flat File Trace Listener")
.CleanUpArchivedFilesWhenMoreThan(7)
.WhenRollFileExists(RollFileExistsBehavior.Increment)
.WithTraceOptions(TraceOptions.Timestamp)
.RollEvery(RollInterval.Day)
.UseTimeStampPattern("yyyy-mm-dd")
.ToFile(logPath)
.FormatWith(
new FormatterBuilder()
.TextFormatterNamed("Text Formatter")
.UsingTemplate("{timestamp}:{title}:{message}"))
.WithFooter("").WithHeader("");
And I'm not seeing the rolling behavior, but am seeing occasional log file corruption. Anyone have any suggestion/ideas?