I'm going to implement Serilog within .net standard 2.0 library. I'm looking for a way to choose which sink(s) should be used for each log line.
Lets say that we define 2 sinks within the configuration (console & file) :
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Debug()
.WriteTo.Console()
.WriteTo.File("c:\\temp\\SerilogTets.txt")
.CreateLogger();
After this, we are going to write one log rule :
Log.Information("Hello, world!"); //<- how can we define which sink we want to use
I'm looking for a way howto define for which sink(s) those lines should be logged for :
- Console & File
- Console only
- File only
Without relying on what loglevel it is.
Thank you in advance!
Kind regards, Kurt