Azure / Azure/azure-functions-core-tools
Option to output log category to Azure Functions Core Tools Function Runtime console and logfile
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 498
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 14
Description
#### What problem would the feature you're requesting solve? Please describe.
I'm always frustrated when I can see my log output in the Azure Functions Core Tools Function Runtime console but I cannot see what class is emitting the log entries because the log category is not included in output.
This would be very useful during development and also to more easily understand and refine log filters.
#### Describe the solution you'd like
Add an option to allow the Category of the log to be output to the Azure Functions Core Tools Function Runtime console.
e.g.
[26/02/2020 13:27:21] [category here] Initializing function HTTP routes
[26/02/2020 13:27:21] [category here] No HTTP routes mapped
[26/02/2020 13:27:21] [category here]
[26/02/2020 13:27:21] [category here] Host initialized (364ms)
[26/02/2020 13:27:21] [category here] Host started (652ms)
[26/02/2020 13:27:21] [category here] Job host started
[26/02/2020 13:27:21] [category here] Debug file watch initialized.
[26/02/2020 13:27:21] [category here] Foo
[26/02/2020 13:27:21] [category here] Bar
[26/02/2020 13:27:21] [category here] Elephant
#### Describe alternatives you've considered
Thought I might get this from looking in the logfile created at %temp%\LogFiles\Application\Functions but whilst that has loglevel it too does not have log category.
Log category is available in application insights but there is no local equivalent of application insights and using the cloud application insights is not a sensible option for cost and latency reasons.
#### Additional context
Add any other context or screenshots about the feature request here.
Contributor guide
Research direction
Start by locating the Azure Functions Core Tools Function Runtime console and logfile formatting paths, then trace how log categories are available to the local logger. Define the option's configuration and verify that enabled output includes the category in both destinations without changing default output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100