-
Notifications
You must be signed in to change notification settings - Fork 123
- Removed existing logger scopes as we want to minimize the number of sc... #172
Conversation
/cc @loudej |
Removing the scopes is a good start. I think we could even live without the logging in router-middleware and route-collection as well -- @loudej thoughts? We want logging when there's an important event that happens - in our code that happens inside |
I'd also really like to see diversification in the kinds of messages logged by |
7b011f8
to
06105ce
Compare
Some examples:
Questions that might come up in general
|
d78d889
to
d6cdf6b
Compare
Matched = false | ||
}); | ||
currentRouteValues = string.Join(", ", | ||
routeValues.Select(rv => $"Key={rv.Key};Value={rv.Value}")); |
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 don't want to 'encode' values for logging. Just log the value that's relevant to the constraint.
Overall seems on the right track ⌚ |
b2ef7ad
to
b034638
Compare
if(constraints != null && constraints.Count == 0) | ||
{ | ||
logger.LogVerbose("No route constraints found."); | ||
} |
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.
None of this should be here
⌚ |
Why are builds are failing? |
@davidfowl stop commenting on PRs and come to the meeting you set up 😆 |
routeValues.TryGetValue(kvp.Key, out routeValue); | ||
|
||
logger.LogVerbose( | ||
"Route value '{RouteValue}' of key '{RouteKey}' did not match " + |
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.
of key -> with key
⌚ for test improvements |
7073d81
to
6c2a23f
Compare
Think about commonizing the code that you're using to compare dictionaries, this is something that's not trivial in xunit, and you'll be doing a fair bit of it. |
Thanks...sure will work on creating an assert for dictionaries... |
- Removed existing logger scopes as we want to minimize the number of scopes being created. - Cleaned up tests related to removal of scopes. - Added new log statements. - Removed old logger structure base implementation and related tests. Added new tests also.
a04761b
to
1c66e0a
Compare
...opes being created.
@rynowak