WriteTo
option is not working, unable to see the log the message in database.
Trying to find out what causing this issue. It shows recommended to go with WriteTo
.
Also, what is the difference AuditTo
vs WriteTo
new LoggerConfiguration().ReadFrom
.Configuration(configObject)
.WriteTo
.Logger(log => log.WriteTo.MSSqlServer(connectionString, "LogMessages", columnOptions: logMessagesColumnOptions)
.Filter
.ByIncludingOnly(t => LogMessagesOptions.Contains(t.Level)))
.Enrich.With(enrichersArray)
.Enrich.FromLogContext()
.CreateLogger();