Azure / Azure/azure-functions-dotnet-worker
Unable to use a more compact format for console logs
- Dominant language
- C#
- Stars
- 466
- Forks
- 215
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 7
Description
### Description
Our goal is to reduce the number of log lines in the console (especially with exceptions):

We've tried using "AddSimpleConsole()" because the format suits us:

And the result is perfect:


However, we have noticed an undesirable effect: the lines written to the console by "AddSimpleConsole()" are also sent to Application Insights (and are orphaned) with the "Host.Function.Console" category:



Is it possible to change the format of logs in the console without duplicating them in Application Insights?
### Steps to reproduce
GitHub repo: [https://github.com/tovich37/azfunc-console-issue](https://github.com/tovich37/azfunc-console-issue)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the reproduction repository at https://github.com/tovich37/azfunc-console-issue and compare the console output with the Application Insights entries described in this issue. Trace how AddSimpleConsole() output is routed, and consider the work done when console logs use the compact format without producing duplicate or orphaned Host.Function.Console entries in Application Insights.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- backend, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100