I've just upgraded my asp web api project from net5 to net6 without touching a single piece of code. Everything works fine but I noticed that when runned inside a container, the log output is displayed as a concatenated series of Json objects instead of the expected console format.
Before
info: Microsoft.Hosting.Lifetime[14]
Now listening on: https://localhost:5001
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:5000
After
{"EventId":14,"LogLevel":"Information","Category":"Microsoft.Hosting.Lifetime","Message":"Now listening on: https://[::]:5001","State":{"Message":"Now listening on: https://[::]:5001","address":"https://[::]:5001","{OriginalFormat}":"Now listening on: {address}"}}
{"EventId":14,"LogLevel":"Information","Category":"Microsoft.Hosting.Lifetime","Message":"Now listening on: http://[::]:5000","State":{"Message":"Now listening on: http://[::]:5000","address":"http://[::]:5000","{OriginalFormat}":"Now listening on: {address}"}}
I don't know if the problem comes from a modification in the actual log structure being sent to the std or from the container engine (docker in my case).
It works fine in console outside container.
Any ideas ?