/// <summary> /// 新增入侵日志 /// </summary> /// <param name="msg"></param> /// <param name="request"></param> public static void AddInvadeLog(string msg, HttpRequest request) { ColoPay.Model.SysManage.ErrorLog model = new ColoPay.Model.SysManage.ErrorLog(); model.Loginfo = string.Format("入侵拦截:[{0}] IP:[{1}]", msg, request.UserHostAddress); model.StackTrace = string.Empty; model.Url = request.Url.AbsoluteUri; ColoPay.BLL.SysManage.ErrorLog.Add(model); }
/// <summary> /// Add system error log /// </summary> public static void AddErrorLog(string Loginfo, string StackTrace, System.Web.UI.Page page) { ColoPay.Model.SysManage.ErrorLog model = new ColoPay.Model.SysManage.ErrorLog(); model.Loginfo = Loginfo; model.StackTrace = StackTrace; model.Url = page.Request.Url.AbsoluteUri; ColoPay.BLL.SysManage.ErrorLog.Add(model); }
public static void AddErrorLog(string Loginfo, string StackTrace, string ClassName) { ColoPay.Model.SysManage.ErrorLog model = new ColoPay.Model.SysManage.ErrorLog(); model.Loginfo = Loginfo; model.StackTrace = ""; model.Url = ClassName; ColoPay.BLL.SysManage.ErrorLog.Add(model); }
/// <summary> /// Add system error log /// </summary> public static void AddErrorLog(string Loginfo, string StackTrace, HttpRequest request) { ColoPay.Model.SysManage.ErrorLog model = new ColoPay.Model.SysManage.ErrorLog(); model.Loginfo = Loginfo; model.StackTrace = StackTrace; model.Url = request.Url.AbsoluteUri; ColoPay.BLL.SysManage.ErrorLog.Add(model); }
/// <summary> /// Add system error log /// </summary> public static void AddErrorLog(string Loginfo, string StackTrace) { ColoPay.Model.SysManage.ErrorLog model = new ColoPay.Model.SysManage.ErrorLog(); model.Loginfo = Loginfo; model.StackTrace = StackTrace; if (HttpContext.Current != null) { model.Url = HttpContext.Current.Request.Url.AbsoluteUri; } else { model.Url = string.Empty; } ColoPay.BLL.SysManage.ErrorLog.Add(model); }