Add logging

This commit is contained in:
2016-09-14 09:55:59 -04:00
parent 052f812d6f
commit 521ceda710
10 changed files with 57 additions and 17 deletions
@@ -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}";
}
}
}
@@ -10,6 +10,7 @@ namespace InventoryTraker.Web.Utilities
{
private readonly FileSystemInfo _excelFile;
// ReSharper disable once ClassNeverInstantiated.Local
private sealed class InventoryTypeMap : CsvClassMap<InventoryType>
{
public InventoryTypeMap()