Kaynağa Gözat

日志存到SLS

lcl 2 gün önce
ebeveyn
işleme
54038cfd75
1 değiştirilmiş dosya ile 5 ekleme ve 6 silme
  1. 5 6
      Util/LogHelper.cs

+ 5 - 6
Util/LogHelper.cs

@@ -15,7 +15,7 @@ public class LogHelper
 
     string[] BlackList = { "好哒查询商户审核状态", "好哒查询实名认证状态", "好哒分账交易详情查询", "间连商户开户意愿确认(提交申请单)查询申请单状态-请求参数", "查询支付宝商家认证申请单状态", "查询支付宝商户意愿申请状态", "获取微信商户开户意愿确认状态", "获取支付宝商家认证状态" };
 
-    public void WriteLog(string Content, string FileName, string BrandId = "0")
+    public void WriteLog(string Content, string FileName)
     {
         if(BlackList.Contains(FileName) && Library.ConfigurationManager.EnvironmentFlag == 2)
         {
@@ -28,11 +28,10 @@ public class LogHelper
             RedisDbconn.Instance.SetExpire(key, 600);
         }
         function.WriteLog(Content, FileName);
-        // Dictionary<string, string> dic = new Dictionary<string, string>();
-        // dic.Add("Topic", FileName);
-        // dic.Add("Content", Content);
-        // dic.Add("BrandId", BrandId);
-        // RedisDbconn.Instance.AddList("LogQueue", Newtonsoft.Json.JsonConvert.SerializeObject(dic));
+        Dictionary<string, string> dic = new Dictionary<string, string>();
+        dic.Add("Topic", FileName);
+        dic.Add("Content", Content);
+        KxsRedisDbconn.Instance.AddList("SlsLogQueue", Newtonsoft.Json.JsonConvert.SerializeObject(dic));
     }
 
     public void Start()