Hi @Angela Calborean ,
Thank you for reaching out to Microsoft Q&A for this question.
I understand that you want to exclude the logs with the following information from ApplicationInsights:
level: Information, Category:Azure.Identity
Please note that you will not be able to exclude the logs based on the message, but you can setup filters for ApplicationInsights to only log messages with specific LogLevel and higher and for specific LogCategory.
Therefore, with the requirement posted in the question, you could include the following in the appsettings.json
file to filter out the messages with LogLevel<=Information && LogCategory = Azure.Identity
{
"Logging": {
"LogLevel": {
"Default": "Information" //----For all types of log providers
},
"ApplicationInsights": { //----Filters for ApplicationInsights
"LogLevel": {
"Azure.Identity": "Warning" //-- only Log Warning, Error and Critical messages from Azure.Identity.
}
}
}
}
For more details on how the Logging is configured, see Configure logging.
The link here contains various LogLevels available and their description.
Also note that the link below only contains some categories used by ASP.NET Core and Entity Framework Core. There may be other categories used in application, which can be confogured for logging as mentoined above.
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-6.0
Please let me know if you have any questions.
---
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.