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)
Dependencies
- Microsoft.AspNetCore.Mvc.Core(>= 2.0.0)
Tags
```
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.