Log Stream of App Service stopped working unexpectedly

Mustafa Jamal 66 Reputation points


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 =>  
                .ConfigureServices(serviceCollection => serviceCollection  
                    .Configure<AzureFileLoggerOptions>(options =>  
                        options.FileName = "azure-diagnostics-";  
                        options.FileSizeLimit = 50 * 1024;  
                        options.RetainedFileCountLimit = 5;  
                    .Configure<AzureBlobLoggerOptions>(options =>  
                        options.BlobName = "log.txt";  

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.



Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,362 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Miller Meares 16 Reputation points

    I experienced this problem! It took me a while to figure it out, but I finally did. I deleted my old log file that was in Home/LogFiles/Application. and then it started working! I'm assuming it was some storage issue.

    Along the way, I also updated the AzureAppServices package manager and uninstalled and reeinstalled the ASP.NET Core Logging Integration extension in Azure. I don't think those contributed, but they could have.

    3 people found this answer helpful.