I have implemented logging in my WPF application using Serilog. I want the output to be generated to be in Excel format.
I want the excel file to have these column headers as mentioned below so that I can sort by applying filters.
date time| logtype |environment| app build version | test case description | status
A sample output should look like below
date time | logtype |environment| app build version| test case description | status
02-04-2020 4:30 | Test Reults|aBC06 |2.0.150 | Loading Views | Success
I have the following logging configuration
public class LoggerFactory : ILoggerFactory
{
public Serilog.Core.Logger Create()
{
var logger = new LoggerConfiguration()
.ReadFrom.AppSettings()
.CreateLogger();
return logger;
}
}
The AppSettings has this configuration
<add key="serilog:using:Seq" value="Serilog.Sinks.Seq" />
<add key="serilog:using:RollingFile" value="Serilog.Sinks.RollingFile" />
<add key="serilog:write-to:RollingFile.pathFormat" value="C:\Dev\Logs\abc-ui-automation-{Date}.txt" />
<add key="serilog:write-to:RollingFile.retainedFileCountLimit" value="10" />
<add key="serilog:write-to:Seq.serverUrl" value="http://localhost:5341" />
Currently, the logger is writing in a txt file without the format mentioned above. How do I ensure that I achieve the task mentioned above?