Hi,
I am working on my newly build application. When I uploaded on Azure and enabled to Azure WebApp Diagnostics initially it was showing all logs properly in Log Stream. BUT after publishing code again it stopped working although updated code had noting to do with logging. Please see the configuration below:
In Program.cs:
public static IWebHostBuilder CreateWebHostBuilder(string[] args)
{
return WebHost.CreateDefaultBuilder(args)
.ConfigureLogging(logging =>
{
logging.AddAzureWebAppDiagnostics();
})
.ConfigureServices(serviceCollection => serviceCollection
.Configure<AzureFileLoggerOptions>(options =>
{
options.FileName = "azure-diagnostics-";
options.FileSizeLimit = 50 * 1024;
options.RetainedFileCountLimit = 5;
})
.Configure<AzureBlobLoggerOptions>(options =>
{
options.BlobName = "log.txt";
}))
.UseStartup<Startup>();
}
In appsettings.json:
"Logging": {
"LogLevel": {
"Default": "Debug"
}
In Azure App Service Settings:
In AppService Logs:
Strange thing is on same setting it was working and stopped working unexpectedly, I am unable to debug issues due to this. Please help.
Thanks,
Mustafa