0

We switched to an approach where we use a managed identity for accessing our storage. Since then, the logs are cluttered with 'Information' lines like the examples below. Is there any way to avoid these logs or at least demote them as debug/trace instead of information? Because it makes reading our logs a pain in the ass now, you have to shift through a lot of useless lines.

2022-08-02 14:49:17.679 DefaultAzureCredential.GetToken invoked. Scopes: [ https://storage.azure.com/.default ] ParentRequestId: 45fe73e5-d0f9-4d29-8736-9e97f06d9490 Information 2022-08-02 14:49:17.679 EnvironmentCredential.GetToken invoked. Scopes: [ https://storage.azure.com/.default ] ParentRequestId: 45fe73e5-d0f9-4d29-8736-9e97f06d9490 Information 2022-08-02 14:49:17.679 DefaultAzureCredential.GetToken invoked. Scopes: [ https://storage.azure.com/.default ] ParentRequestId: 45fe73e5-d0f9-4d29-8736-9e97f06d9490 Information 2022-08-02 14:49:17.679 EnvironmentCredential.GetToken was unable to retrieve an access token. Scopes: [ https://storage.azure.com/.default ] ParentRequestId: 45fe73e5-d0f9-4d29-8736-9e97f06d9490 Exception: Azure.Identity.CredentialUnavailableException (0x80131500): EnvironmentCredential authentication unavailable. Environment variables are not fully configured. See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/environmentcredential/troubleshoot Information 2022-08-02 14:49:17.679 EnvironmentCredential.GetToken was unable to retrieve an access token. Scopes: [ https://storage.azure.com/.default ] ParentRequestId: 45fe73e5-d0f9-4d29-8736-9e97f06d9490 Exception: Azure.Identity.CredentialUnavailableException (0x80131500): EnvironmentCredential authentication unavailable. Environment variables are not fully configured. See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/environmentcredential/troubleshoot Information 2022-08-02 14:49:17.679 EnvironmentCredential.GetToken invoked. Scopes: [ https://storage.azure.com/.default ] ParentRequestId: 45fe73e5-d0f9-4d29-8736-9e97f06d9490 Information 2022-08-02 14:49:17.680 ManagedIdentityCredential.GetToken invoked. Scopes: [ https://storage.azure.com/.default ] ParentRequestId: 45fe73e5-d0f9-4d29-8736-9e97f06d9490 Information 2022-08-02 14:49:17.680 ManagedIdentityCredential.GetToken invoked. Scopes: [ https://storage.azure.com/.default ] ParentRequestId: 45fe73e5-d0f9-4d29-8736-9e97f06d9490 Information

Regards, Sven Peeters

  • This answer should help u: https://stackoverflow.com/questions/53484337/stop-an-azure-function-from-logging-the-executing-and-executed-messages – D A Aug 03 '22 at 08:21
  • Problem is that all those pesky messages are logged with level 'Information' while they should be logged as trace or debug. Information is something you always want to log so lower the level to warning is not a solution for us – Sven Peeters Aug 03 '22 at 12:13

0 Answers0