-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert the Console Formatter Default #3633
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Suggested changes to the intro In .NET 6 we made the decision to default, the console logger in .NET 6 default
Patch update.NET 6 Patch update reverted back to
|
If they use automated tools to collect the container logs and are expecting the default behavior of those logs being formatted as JSON, this change will break them. They will need to explicitly set |
Thank you @mthalman. Looks like @ldillonel made some updates based on the feedback above are we okay to ship this announcement? |
My only remaining feedback is on the last section, Setting ConsoleFormatter to JSON. That's framed around the solution. I think it instead needs to be framed around the problem, (i.e. the breaking change). There needs to be text which calls out that this is breaking and letting the customer know what to do when they've been broken. Here's a suggestion: Breaking ChangeQuestion: What do I do if this change breaks my system that relies on JSON formatting? If you are currently using or want to use JSON, you will need to opt into this behavior since it will no longer be on by default. To do this please set the |
I've updated the Patch Update section to include timeframe of the change. The intention is to announce this ahead of time, at least in this repo, so people can know it's coming ahead of time. That's why we need to indicate a timeframe. |
Review is completed. Closing. |
In .NET 6 we made the decision to default the console logger in
CreateDefaultBuilder()
to structured JSON logs; to support container environments where folks use tools like fluentd or Azure Monitor to collect those logs. However, this resulted in non-human readable output that does not work well when viewing this output to analyze logs. Please see this issue for more details. We have made the decision to revert the default behavior back to multiline human-readable output..NET 6 default
Logging__Console__FormatterName="Json"
output:Patch Update
In the May 2022 servicing update for .NET 6, we will change the
Logging__Console__FormatterName
environment variable to be unset for the ASP.NET Core container images. This will cause it to revert back to the original simple output.Example output:
Breaking Change
Question: What do I do if this change breaks my system that relies on JSON formatting?
If you are currently using or want to use JSON, you will need to opt into this behavior since it will no longer be on by default. To do this please set the
Logging__Console__FormatterName
environment variable toJson
.The text was updated successfully, but these errors were encountered: