Add logging
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace InventoryTraker.Web.Utilities
|
||||
{
|
||||
public static class ControllerContextExtensions
|
||||
{
|
||||
public static string GetLoggerName(this ControllerContext ctx)
|
||||
{
|
||||
var controller = ctx.RouteData.Values["controller"].ToString();
|
||||
var action = ctx.RouteData.Values["action"].ToString();
|
||||
return $"{controller}Controller.{action}";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user