* Fix LoggingExtension Naming

This commit is contained in:
ryanbrandenburg 2016-01-07 10:03:07 -08:00
parent 6e8b2ecd63
commit b942e96216
3 changed files with 6 additions and 6 deletions

View File

@ -8,22 +8,22 @@ namespace Microsoft.AspNet.Routing.Logging
{
internal static class TreeRouterLoggerExtensions
{
private static readonly Action<ILogger, string, string, Exception> _matchedRouteName;
private static readonly Action<ILogger, string, string, Exception> _matchedRoute;
static TreeRouterLoggerExtensions()
{
_matchedRouteName = LoggerMessage.Define<string, string>(
_matchedRoute = LoggerMessage.Define<string, string>(
LogLevel.Debug,
1,
"Request successfully matched the route with name '{RouteName}' and template '{RouteTemplate}'.");
}
public static void MatchedRouteName(
public static void MatchedRoute(
this ILogger logger,
string routeName,
string routeTemplate)
{
_matchedRouteName(logger, routeName, routeTemplate, null);
_matchedRoute(logger, routeName, routeTemplate, null);
}
}
}

View File

@ -106,7 +106,7 @@ namespace Microsoft.AspNet.Routing
{
return TaskCache.CompletedTask;
}
_logger.MatchedRouteName(Name, ParsedTemplate.TemplateText);
_logger.MatchedRoute(Name, ParsedTemplate.TemplateText);
return OnRouteMatched(context);
}

View File

@ -192,7 +192,7 @@ namespace Microsoft.AspNet.Routing.Tree
continue;
}
_logger.MatchedRouteName(match.Entry.RouteName, match.Entry.RouteTemplate.TemplateText);
_logger.MatchedRoute(match.Entry.RouteName, match.Entry.RouteTemplate.TemplateText);
context.RouteData = newRouteData;