* Fix LoggingExtension Naming
This commit is contained in:
parent
6e8b2ecd63
commit
b942e96216
|
|
@ -8,22 +8,22 @@ namespace Microsoft.AspNet.Routing.Logging
|
||||||
{
|
{
|
||||||
internal static class TreeRouterLoggerExtensions
|
internal static class TreeRouterLoggerExtensions
|
||||||
{
|
{
|
||||||
private static readonly Action<ILogger, string, string, Exception> _matchedRouteName;
|
private static readonly Action<ILogger, string, string, Exception> _matchedRoute;
|
||||||
|
|
||||||
static TreeRouterLoggerExtensions()
|
static TreeRouterLoggerExtensions()
|
||||||
{
|
{
|
||||||
_matchedRouteName = LoggerMessage.Define<string, string>(
|
_matchedRoute = LoggerMessage.Define<string, string>(
|
||||||
LogLevel.Debug,
|
LogLevel.Debug,
|
||||||
1,
|
1,
|
||||||
"Request successfully matched the route with name '{RouteName}' and template '{RouteTemplate}'.");
|
"Request successfully matched the route with name '{RouteName}' and template '{RouteTemplate}'.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void MatchedRouteName(
|
public static void MatchedRoute(
|
||||||
this ILogger logger,
|
this ILogger logger,
|
||||||
string routeName,
|
string routeName,
|
||||||
string routeTemplate)
|
string routeTemplate)
|
||||||
{
|
{
|
||||||
_matchedRouteName(logger, routeName, routeTemplate, null);
|
_matchedRoute(logger, routeName, routeTemplate, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ namespace Microsoft.AspNet.Routing
|
||||||
{
|
{
|
||||||
return TaskCache.CompletedTask;
|
return TaskCache.CompletedTask;
|
||||||
}
|
}
|
||||||
_logger.MatchedRouteName(Name, ParsedTemplate.TemplateText);
|
_logger.MatchedRoute(Name, ParsedTemplate.TemplateText);
|
||||||
|
|
||||||
return OnRouteMatched(context);
|
return OnRouteMatched(context);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@ namespace Microsoft.AspNet.Routing.Tree
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.MatchedRouteName(match.Entry.RouteName, match.Entry.RouteTemplate.TemplateText);
|
_logger.MatchedRoute(match.Entry.RouteName, match.Entry.RouteTemplate.TemplateText);
|
||||||
|
|
||||||
context.RouteData = newRouteData;
|
context.RouteData = newRouteData;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue