More Progress

This commit is contained in:
2012-12-12 21:41:38 -05:00
parent 14d8054f22
commit 260118ff90
23 changed files with 114 additions and 94 deletions
+5 -5
View File
@@ -9,12 +9,12 @@ namespace MileageTraker.Web.Utility
{
if (filterContext != null)
{
string controller = filterContext.RouteData.Values["controller"].ToString();
string action = filterContext.RouteData.Values["action"].ToString();
string loggerName = string.Format("{0}Controller.{1}", controller, action);
string @params = string.Join(", ", filterContext.ActionParameters.Select(i => i.Key + ": " + i.Value));
var controller = filterContext.RouteData.Values["controller"].ToString();
var action = filterContext.RouteData.Values["action"].ToString();
var loggerName = string.Format("{0}Controller.{1}", controller, action);
var @params = string.Join(", ", filterContext.ActionParameters.Select(i => i.Key + ": " + i.Value));
string hostAddress = "UserHostAddress: " + filterContext.HttpContext.Request.UserHostAddress;
var hostAddress = "UserHostAddress: " + filterContext.HttpContext.Request.UserHostAddress;
log4net.LogManager.GetLogger(loggerName).Info(hostAddress + ", " + @params);
}