예제 #1
0
파일: LogHelp.cs 프로젝트: dmhai/ColoPay
 /// <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);
 }
예제 #2
0
 /// <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);
 }
예제 #3
0
파일: LogHelp.cs 프로젝트: dmhai/ColoPay
 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);
 }
예제 #4
0
 /// <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);
 }
예제 #5
0
파일: LogHelp.cs 프로젝트: dmhai/ColoPay
 /// <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);
 }