I'm developing a .NET Core 3.0 web application and publishing it as an Azure App Service.
In one of the controller methods, I do this:
System.Diagnostics.Trace.TraceError("If you're seeing this, something wonderful happened");
Then I go in the Azure App Service - App Service Logs and enable "Application Logging". Next, I go in "Log stream", where I'm supposed to be able to see live debug logging, but I don't see anything.
Please advice!
...
Edited: I changed my Program.cs file a bit but it still doesn't work. Here's my Program.cs file:
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.ConfigureLogging(logging =>
{
logging.ClearProviders();
logging.AddConsole();
})
.UseStartup<Startup>();
}