I want to prevent the Azure Functions log 'Excuting / Executed' from being displayed.

Hinata Katsunori 536 Reputation points
2023-07-27T07:07:13.2266667+00:00

Real-time logs are monitored using the log stream on the Azure Functions portal screen.
 
The Information level log 'Executing / Executed' output from the runtime is disturbing and I want to prevent it from being displayed.    
The host.json contains the following, but I am not sure if this setting is really reflected.
(The logs output from my own LogInformation function also appear in the log stream, even if I have included the following).

{
  "version": "2.0",
  "logging": {
    "logLevel": {
      "Function.WatchLocationDataFunc": "Warning",
      "Function.WatchLocationDataFunc.User": "Warning",
      "Host.Aggregator": "Warning",
      "Host.Results": "Warning"
    },
    "applicationInsights": {
      "samplingSettings": {
        "isEnabled": true,
        "excludedTypes": "Request"
      }
    }
  }
}

 
We have also tried the following with reference to other QAs

{
  "version": "2.0",
  "logging": {
    "logLevel": {
      "Function.WatchLocationDataFunc.User": "Information",
      "Function": "Error"
    },
    "applicationInsights": {
      "samplingSettings": {
        "isEnabled": true,
        "excludedTypes": "Request"
      }
    }
  }
}

How can I hide the Executing / Executed log?
Can't the log level displayed in the log stream be restricted in host.json?
 
Thanks in advance.

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.


Answer accepted by question author
MayankBargali-MSFT 71,021 Reputation points Moderator
2023-07-28T12:07:42.0466667+00:00

@Hinata Katsunori Thanks for reaching out. Can you please confirm if you don't want to log the information logging in the application insights and monitor tab of your function app. It can either be excluded or included for the both and not to any of the individual.

Update:

As discussed, unfortunately there is no way to Execution/Executed only in the log monitor

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.