zhoufan 4 年之前
父節點
當前提交
2b40a27491

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/App_Start/ErrorAttribute.cs

37
                 Params.Add(key, rt.Params[key]);
37
                 Params.Add(key, rt.Params[key]);
38
             }
38
             }
39
 
39
 
40
-            log.Error(Params.ToJson() + "\r\n" + context.Exception.ToString());
40
+            log.Error("系统异常,请求信息:" + Params.ToJson(), context.Exception);
41
         }
41
         }
42
     }
42
     }
43
 }
43
 }

+ 5 - 0
CallCenterCommon/CallCenter.Utility/log/Log.cs

1
 using log4net;
1
 using log4net;
2
+using System;
2
 
3
 
3
 namespace CallCenter.Utility
4
 namespace CallCenter.Utility
4
 {
5
 {
17
         {
18
         {
18
             this.logger.Error(RequestString.GetIP() + "  " + message);
19
             this.logger.Error(RequestString.GetIP() + "  " + message);
19
         }
20
         }
21
+        public void Error(object message, Exception ex)
22
+        {
23
+            this.logger.Error(RequestString.GetIP() + "  " + message, ex);
24
+        }
20
         public void Info(object message)
25
         public void Info(object message)
21
         {
26
         {
22
             this.logger.Info(RequestString.GetIP() + "  " + message);
27
             this.logger.Info(RequestString.GetIP() + "  " + message);