Skip to content
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

Refactor Logging.Console configure options #82254

Merged

Conversation

eerhardt
Copy link
Member

  • Use nameof instead hard-coded strings
  • Move the configuration binding code to the options class. This allows the configure method to be virtual and only need a single ConsoleFormatterOptions class.
  • Minor cleanup

Respond to 0f129e4#commitcomment-100824571 feedback.

- Use nameof instead hard-coded strings
- Move the configuration binding code to the options class. This allows the configure method to be virtual and only need a single ConsoleFormatterOptions class.
- Minor cleanup
@ghost
Copy link

ghost commented Feb 16, 2023

Tagging subscribers to this area: @dotnet/area-extensions-logging
See info in area-owners.md if you want to be subscribed.

Issue Details
  • Use nameof instead hard-coded strings
  • Move the configuration binding code to the options class. This allows the configure method to be virtual and only need a single ConsoleFormatterOptions class.
  • Minor cleanup

Respond to 0f129e4#commitcomment-100824571 feedback.

Author: eerhardt
Assignees: eerhardt
Labels:

area-Extensions-Logging

Milestone: -

eerhardt referenced this pull request Feb 16, 2023
* Remove ConfigurationBinder usage from Console Logging

This allows ConfigurationBinder, and its dependencies like TypeConverter,
to be trimmed in an application that uses Console Logging, like an
ASP.NET API application.

Fix #81931

* Ensure invalid configuration data throws appropriate exception.
@eerhardt
Copy link
Member Author

Failures were #82240.

@eerhardt eerhardt merged commit 86bfe2a into dotnet:main Feb 22, 2023
@eerhardt eerhardt deleted the RefactorConsoleFormatterConfigureOptions branch February 22, 2023 20:28
@ghost ghost locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants