Hi !!
One of our requirement is to log action current user is trying to perform i.e. Log which controller/action he is invoking. To solve this cross cutting issue, I decided to implement Middleware approach in MVC 6. However I am not able to get the name of the controller and method name in my logging Middleware. Can someone guide me how to get access to that?
I can see in output window that ASPNET5/MVC 6 is logging the controller name/action name as follows, so there is a way, but not sure how,
Microsoft.AspNet.Mvc.Infrastructure.MvcRouteHandler: Information: Executed action WebAPI.Controllers.RequestsController.GetRequestBasic in 0.0593ms