Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

145
Views
Azure Functions Logging

In Azure Functions you use host.json to configure logging. However, the logging options/sections are unclear to me. Can someone help?

Per this: https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json

  "logging": {
        // FILE CONFIG?
        "fileLoggingMode": "debugOnly"
        "logLevel": {
          "Function.MyFunction": "Information", // where is this log?
          "default": "None"
        },
        // INSIGHTS CONFIG
        "applicationInsights": {
            "samplingSettings": {
              "isEnabled": true,
              "excludedTypes" : "Dependency;Event",
              "includedTypes" : "PageView;Trace"
            },
  1. Is the FILE CONFIG section used for logging in "log stream"? or is the INSIGHT section? enter image description here

  2. What is 'default' vs 'Function" log level?

I assume Filesystem logs is what controlled via FILE CONFIG section, correct?

  1. What configuration is used for "Monitor" section of Azure Functions?, is it FILE CONFIG? if so, If I wanted to see only errors under "Monitor" section would I set Function.MyFunction": "Error" or "default"?

enter image description here

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

  1. FileLoggingMode is used to generate the logs in azure portal or in a local Environment. The different modes in “fileLoggingMode” are

“debugOnly”: This level will generate logs when the function app is running on Azure Portal. This is the default mode.

“always”: This mode is used to generate logs in local environment as well as when running on Azure Portal. This code reference can be helpful to understand it better.

“never”: This mode does not generate any logs.

When the “fileLoggingMode” is set to “always” the log file generated when running in local environment is stored in “C:\Users{user}\AppData\Local\Temp\LogFiles\Application\Functions\Function{Function_Name}”, the path can be referenced here in the Host Settings code. If you are running the function app as docker/container in your local premises you can change the path by updating the host configuration code.

The fileLoggingMode is still in issue see here

  1. Default Vs Function log is both are same level check the below json

In a logging loglevel we have Parameters default/function/… we where mention the Which type of log can we need to get like (error, information, trace, ….)

{
"logging": {
    "fileLoggingMode": "always",
    "logLevel": {
        "default": "Information",
        "Function": "Error"
        }
    }
}

Refer: Configure monitoring for Azure Functions | Microsoft Docs

  1. In a default it get the log information of what you added in a parameter (host.json). If you are using "default": "Error" you will get the Error logs by default.

If you are using below configuration by default it will get the Information Log and Funcition get the Error log.

"default": "Information",

"Function": "Error"
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!