-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Conversation
Hi @ryanbrandenburg, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! The agreement was validated by .NET Foundation and real humans are currently evaluating your PR. TTYL, DNFBOT; |
c77d5a7
to
74504c2
Compare
@@ -297,7 +287,7 @@ private Task InvokeAllAuthorizationFiltersAsync() | |||
} | |||
else | |||
{ | |||
Logger.LogWarning(AuthorizationFailureLogMessage, current.FilterAsync.GetType().FullName); | |||
Logger.AuthorizationFailure(current.FilterAsync.GetType().FullName); |
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.
Pass in the filter, and do the deep dive into inside your extension method
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.
Repeat ad nauseum
overall looking good, a few things here can be simplified. |
⌚ |
@@ -63,14 +64,13 @@ public class ModeMatchResult<TMode> | |||
match => match.PresentAttributes.Any( | |||
attribute => PartiallyMatchedAttributes.Contains( | |||
attribute, StringComparer.OrdinalIgnoreCase))); | |||
|
|||
//TODO: What the heck is this thing? | |||
logger.LogWarning(new PartialModeMatchLogValues<TMode>(uniqueId, viewPath, partialOnlyMatches)); |
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.
We still want to create the extension method here, just move PartialModeMatchLogValues
to be a private class inside that class, and then use LogWarning
as-is.
6a6849b
to
9cff708
Compare
{ | ||
public static class DefaultActionSelectorLoggerExtensions | ||
{ | ||
private static Action<ILogger, string, Exception> _ambiguousActions; |
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.
readonly
on both.
Left a few guiding comments in |
"constraint '{ActionConstraint}'"); | ||
} | ||
|
||
public static void AmbiguousActions(this ILogger logger, string actionNames) |
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.
When we had [NotNull]
we'd typically decorate the heck out of all of our public extension methods. Now that we don't, with this new pattern are we not doing manual null
checks? I'm conflicted about it myself which is why i ask because it'd add a to of boiler plate. RIP [NotNull]
Same comment applies below.
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.
This should all be internal
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.
👍
⌚ |
|
6ce0145
to
77fbc44
Compare
Is this still waiting to be merged? |
77fbc44
to
0561f4c
Compare
I keep having CI failures after the rebase, I'll make it happen. |
57d7eb1
to
18a5032
Compare
18a5032
to
5763eb5
Compare
Move existing instances of logging to the new style.