2

I am prototyping using Serilog in a .NET 7 console app. For a number of existing console apps, we copy, email, or otherwise process log/results files. So, I'd like to get the fully qualified filename of the log file that Serilog has written to. Any links to information about how to do that? I have looked at the Serilog website, but it's a bit sparse, IMHO.

Log.Logger = new LoggerConfiguration()
           .MinimumLevel.Debug()
           .WriteTo.Console()
           .WriteTo.File("MyConsoleApp.txt", rollingInterval: RollingInterval.Day)
           .CreateLogger();
Margo Noreen
  • 396
  • 1
  • 3
  • 12

0 Answers0