I have serilog on my .net core app basic config as follows:-
Log.Logger = new LoggerConfiguration()
.ReadFrom.Configuration(Configuration)
.Enrich.FromLogContext()
.WriteTo.File(@"./logs/log-.log", rollingInterval: RollingInterval.Day, outputTemplate: LOG_TEMPLATE)
.WriteTo.Console(outputTemplate: LOG_TEMPLATE, theme: AnsiConsoleTheme.Literate)
.WriteTo.SomeOtherLog()
.CreateLogger();
Lets now say I wish to write to SomeOtherLog based on a condition. How would one go about that?
Something like
if(conditon)
.WriteTo.SomeOtherLog()