AspNetCore.Mvc.Routes.DebuggingLoggerMiddleware : Simple Route Debugging to your Logger NuGet Package

Add RouteDebuggingLogger to your AspNetCore app and behold in relieve as it explains to your Logger what routes AspNetCore.Mvc has identified.

```
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app
.UseDeveloperExceptionPage()
.UseMiddleware<RouteDebuggingLogger>();
}
app
.UseMvcWithDefaultRoute()
.UseComponentAsService()
.UseKitchenSink();
}

```
Example output:
```
info: AspNetCore.Mvc.Routes.DebuggingLoggerMiddleware.RouteDebuggingLogger[0]
Microsoft.AspNetCore.Mvc.Internal.ActionDescriptorCollectionProvider.ActionDescriptors.Version=0.

Actions.Count=13
info: AspNetCore.Mvc.Routes.DebuggingLoggerMiddleware.RouteDebuggingLogger[0]
Action: Example.AspNetCore.Empty.HomeController.Index (Example.AspNetCore.Minimal) Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor
Constraints: null
AttributeRouteInfo :
BoundProperties : []
FilterDescriptors : [{"FilterType":"Microsoft.AspNetCore.Mvc.Internal.ControllerActionFilter","Order":-2147483648,"Scope":20},{"FilterType":"Microsoft.AspNetCore.Mvc.ViewFeatures.SaveTempDataAttribute","Order":-2147483548,"Scope":10},{"FilterType":"Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter","Order":0,"Scope":10}]
Parameters : []
Properties : {}
RouteValues : {"action":"Index","controller":"Home"}
Timings in milliseconds to inspect and format each attribute: Name:0, Constraints:23, AttributeRouteInfo:23, BoundProperties:41, FilterDescriptors:60, Parameters:63, Properties:67, RouteValues:69

..etc ...

```

Set `RouteDebuggingLogger.LogLevel` if you must change the LogLevel.




Got any AspNetCore.Mvc.Routes.DebuggingLoggerMiddleware : Simple Route Debugging to your Logger Question?





Info

Version: 1.0.0
Author(s): Chris F Carroll
Last Update: Sunday, November 4, 2018
.NET Fiddle: Online Example
Project Url: https://github.com/chrisfcarroll/ComponentAsService
NuGet Url: https://www.nuget.org/packages/AspNetCore.Mvc.Routes.DebuggingLoggerMiddleware


Install
Install-Package AspNetCore.Mvc.Routes.DebuggingLoggerMiddleware
dotnet add package AspNetCore.Mvc.Routes.DebuggingLoggerMiddleware
paket add AspNetCore.Mvc.Routes.DebuggingLoggerMiddleware
AspNetCore.Mvc.Routes.DebuggingLoggerMiddleware Download (Unzip the "nupkg" after downloading)

2 packages depend on this package.


Tags



STATS

must-have-score

.3

avg-downloads-per-day

4

days-since-last-release

1999