[BUG] Web App Service Logs Retention Days not set for Application Logging
See original GitHub issueReference this issue: https://github.com/Azure/azure-sdk-for-net/issues/9222
There are two log config classes here, ApplicationLogsConfig stands for Application Logging, and HttpLogsConfig stands for Web Server Logging.
Code snippet to set Application Logging Retention Days
.WithApplicationLogging()
.WithLogLevel(LogLevel.Verbose)
.WithApplicationLogsStoredOnStorageBlob("sasToken")
.WithLogRetentionDays(30)
Code snippet to set Web Server Logging Retention Days
.WithWebServerLogging()
.WithWebServerLogsStoredOnStorageBlob("sasToken")
.WithLogRetentionDays(30)
Both above code snippets end up to call the same method WebAppDiagnosticLogsImpl(code as below).
public WebAppDiagnosticLogsImpl<FluentT, FluentImplT, DefAfterRegionT, DefAfterGroupT, UpdateT> WithLogRetentionDays(int retentionDays)
{
if (Inner.HttpLogs != null && Inner.HttpLogs.FileSystem != null && Inner.HttpLogs.FileSystem.Enabled.HasValue && Inner.HttpLogs.FileSystem.Enabled.Value)
{
Inner.HttpLogs.FileSystem.RetentionInDays = retentionDays;
}
if (Inner.HttpLogs != null && Inner.HttpLogs.AzureBlobStorage != null && Inner.HttpLogs.AzureBlobStorage.Enabled.HasValue && Inner.HttpLogs.AzureBlobStorage.Enabled.Value)
{
Inner.HttpLogs.AzureBlobStorage.RetentionInDays = retentionDays;
}
return this;
}
This method updates Retention Days of HttpLogsConfig. It should not update Retention Days of Application Logging, right? Update Retention Days of Application Logging should use ApplicationLogsConfig, right?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
[BUG] Web App Service Logs Retention Days not set for ...
Describe the bug When setting the Application Logging Retention days, the value is not set (note that this is not a problem for...
Read more >Set Retention Period for App Service logs in Azure ...
To my understanding the setting "retentionInDays" corresponds to "Retention Period (Days)" which can be found in the Azure Portal in the WebApp ......
Read more >App service logs quota/retention period not working
I've configured my docker webapp to log to the File System and set the Quota to 100MB and Retention period to 11 days....
Read more >Enable diagnostics logging - Azure App Service
Enable diagnostics logging for apps in Azure App Service ... In Retention Period (Days), set the number of days the logs should be...
Read more >Structured Logging In Microsoft's Azure Application Insights
By default, the life span of logs in Azure Application Insights is 90 days, and it can go up to 730 days. The...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@yungezz
next release would be 1.34.1