Azure / Azure/azure-functions-core-tools

How to change log level when testing locally.

Open
#3,138 4 comments 0 reactions 0 assignees View on GitHub
investigate
Dominant language
C#
Stars
1.5k
Forks
498
Avg merge
4d 20h
Merged PRs (30d)
14

Description

I'd like to be able to modify the log level when testing a function locally. I've tried setting the log level in local.settings.json but this had no impact:
`"logging": {
"logLevel": {
"FunctionApp.FunctionName": "Debug"
}
}`

Setting the default logLevel in host.json to debug resulted in a truck load more output from the runtime but did not show the LogDebug() output from my function. Adding the attribute "FunctionApp.FunctionName": "Debug" to the logLevel in host.json also made no difference.

Can you modify the log level when running locally? If so how?

Thanks in advance.

Contributor guide

Open the contributing guide

Research direction

Review the logging sections in local.settings.json and host.json, then check how the local Azure Functions host handles the FunctionApp.FunctionName category and LogDebug output. Done means the documented configuration lets a contributor change the function log level during local testing without producing unnecessary runtime output.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
cli, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.