-
Notifications
You must be signed in to change notification settings - Fork 762
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
Work on the logging generator. #4840
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ghost
assigned geeknoid
Dec 25, 2023
geeknoid
force-pushed
the
geeknoid/logger_features
branch
from
December 25, 2023 23:16
d512ff4
to
7c26e33
Compare
RussKie
approved these changes
Dec 26, 2023
xakep139
reviewed
Dec 27, 2023
src/Generators/Microsoft.Gen.Logging/Parsing/TypeSymbolExtensions.cs
Outdated
Show resolved
Hide resolved
xakep139
reviewed
Dec 27, 2023
test/Generators/Microsoft.Gen.Logging/TestClasses/LogPropertiesSpecialTypesExtensions.cs
Outdated
Show resolved
Hide resolved
xakep139
reviewed
Dec 27, 2023
geeknoid
force-pushed
the
geeknoid/logger_features
branch
2 times, most recently
from
December 27, 2023 15:44
d21d49e
to
3cfdaec
Compare
xakep139
reviewed
Dec 27, 2023
xakep139
reviewed
Dec 27, 2023
xakep139
reviewed
Dec 27, 2023
xakep139
reviewed
Dec 27, 2023
xakep139
approved these changes
Dec 27, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few non-blocking comments, but the PR looks good to me
- The generator now produces a warning when asked to log an object which doesn't implement ToString(), IConvertible, or IFormattable. Fixed #4835. - Added support for the Transitive property in the LogProperties attribute. When set to true, this causes automatic transitive traversal of a complex object, instead of requiring manual annotations of individual properties. Fixes #4738. - Introduce the [TagName] attribute to make it possible to control the tag name used when logging a parameter or property. Fixes #4576. - Fixed some situations where unnatural errors were produced as a result of a prior error. The dummy follow-on errors are now avoided. - Fixed handling of cases where parameters or properties were of type of the non-generic IEnumerable. The specific type wasn't being recorgnized and treated as an enumerable.
geeknoid
force-pushed
the
geeknoid/logger_features
branch
from
December 27, 2023 19:00
3cfdaec
to
129c4f1
Compare
ghost
added this to the 8.1 milestone
Dec 27, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The generator now produces a warning when asked to log an object which doesn't implement ToString(), IConvertible, or IFormattable. Fixed Suggest using [LogProperties] in [LoggerMessage] source-gen #4835.
Added support for the Transitive property in the LogProperties attribute. When set to true, this causes automatic transitive traversal of a complex object, instead of requiring manual annotations of individual properties. Fixes Add support to transitively log complex object graphs. #4738.
Introduce the [TagName] attribute to make it possible to control the tag name used when logging a parameter or property. Fixes LoggerMessage: Introduce an attribute TagName allowing to set the name of the tag being logged #4576.
Fixed some situations where unnatural errors were produced as a result of a prior error. The dummy follow-on errors are now avoided.
Fixed handling of cases where parameters or properties were of type of the non-generic IEnumerable. The specific type wasn't being recognized and treated as an enumerable.
Microsoft Reviewers: Open in CodeFlow