I am trying to use Serilog in my ASP.Net Core app, but can't get it to work. As soon as I added .UseSerilog() in my Program.cs, messages that normally go to the console screen disappear and there is no log file created. Here is how I enable Serilog:
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.UseSerilog()
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
and here is my appsettings:
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Grpc": "Information",
"Microsoft": "Information",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
From what I've learned, it seems that the log file will be written into a folder, "logs", under the VS.net project by default (at least it appears to be so from an example I looked at). What do I miss?

