This commit is contained in:
2012-11-30 21:35:06 -05:00
commit 3963d6363a
346 changed files with 351799 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
using System.Web.Mvc;
namespace MileageTraker.Web.Controllers
{
public class ControllerBase : Controller
{
protected override void OnException(ExceptionContext filterContext)
{
if (filterContext != null && filterContext.Exception != null)
{
var controller = filterContext.RouteData.Values["controller"].ToString();
var action = filterContext.RouteData.Values["action"].ToString();
var loggerName = string.Format("{0}Controller.{1}", controller, action);
log4net.LogManager.GetLogger(loggerName).Error(string.Empty, filterContext.Exception);
}
base.OnException(filterContext);
}
}
}