I am logging events of all types to single Json file irrespective of LogLevel. Now I have a requirement to log some custom performance counters to a seperate Json file. How can
If you want to have an independent logging pipeline, just make another instance. This is robbed and adapted from https://github.com/serilog/serilog/wiki/Lifecycle-of-Loggers:
using (var performanceCounters = new LoggerConfiguration()
.WriteTo.File(@"myapp\log.txt")
.CreateLogger())
{
performanceCounters.Information("Performance is really good today ;-)");
// Your app runs, then disposal of `performanceCounters` flushes any buffers
}