❔ Serilog: how to write a file for single level
Hi guys! I've been asked to write log levels Information, Warning and Error in development, but each of them in one separated file, so that I have information.txt containing only Information logs, warning.txt containing only Warning logs, Error.txt containing only Error logs.
This is my implementation at the moment (it works):
In Program.cs:
in appsettings:
I have installed Serilog.Expressions package and read the docs, I know I have to use something like this
but I can't understand where it should be placed. I've tried placing it in Args or between Args and Name but it doesn't work, can somebody help me?
This is my implementation at the moment (it works):
In Program.cs:
in appsettings:
I have installed Serilog.Expressions package and read the docs, I know I have to use something like this
but I can't understand where it should be placed. I've tried placing it in Args or between Args and Name but it doesn't work, can somebody help me?