AspNet MVC Controller Layout Renderer
Rolf Kristensen edited this page Jan 1, 2022
·
5 revisions
ASP.NET MVC Controller-Name by lookup of controller
-value in HttpContext.Current.GetRouteData
Platforms Supported: All
Introduced in NLog.Web 4.3
${aspnet-mvc-controller}
Use this layout renderer to insert the Controller from MVC Pipeline.
See also AspNetRequest-RouteParameters-Layout-Renderer for lookup of other Route-Parameter Values.
- Troubleshooting Guide - See available NLog Targets and Layouts: https://nlog-project.org/config
- Getting started
- How to use structured logging
- Troubleshooting
- FAQ
-
All targets, layouts and layout renderers
Popular: - Using NLog with NLog.config
- Using NLog with appsettings.json