public override void OnResultExecuted(ResultExecutedContext filterContext) { MonitorLog monLog = filterContext.Controller.ViewData[this.key] as MonitorLog; monLog.ExecuteEndTime = DateTime.Now; LoggerHelper.Monitor(monLog.GetLogInfo(MonitorLog.MonitorType.View)); filterContext.Controller.ViewData.Remove(this.key); }
public override void OnActionExecuted(ActionExecutedContext filterContext) { MonitorLog monLog = filterContext.Controller.ViewData[this.key] as MonitorLog; monLog.ExecuteEndTime = DateTime.Now; monLog.FormCollections = filterContext.HttpContext.Request.Form; //form表单提交的数据 monLog.QueryCollections = filterContext.HttpContext.Request.QueryString; //Url 参数 LoggerHelper.Monitor(monLog.GetLogInfo()); }