I've tried various attempts at getting logging to show in Azure, but nothing is working. My latest attempt was this:
https://ardalis.com/configuring-logging-in-azure-app-services/
I added this to my project:
https://www.nuget.org/packages/Microsoft.Extensions.Logging.AzureAppServices
In Programs.cs, I did this:
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>()
.ConfigureLogging(logging =>
{
logging.ClearProviders();
logging.AddConsole();
logging.AddAzureWebAppDiagnostics();
});
});
And I have this line in an API controller method that gets called:
_logger.LogWarning("Test warning logging.");
I also tried logging this way:
Trace.TraceWarning("Test warning logging (trace).");
My Azure App Service Logs settings look like this:
Yet, when I go to log stream, there are never any messages:
I'm at a lost as to what to try next.



verboseyou should be seeing lots of stuff.