From f23ad1b3f9f6193f35f72104d690b21dc67d5c1f Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 06 七月 2020 12:35:25 +0800
Subject: [PATCH] 去掉了访问外网的异步

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs
index 5ad7ed1..3c3e6b6 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs
@@ -56,13 +56,13 @@
         /// <summary>
         /// Log鍑哄姏
         /// </summary>
-        /// <param name="div">1:鏅�歀og,-1:鑷村懡閿欒Log</param>
+        /// <param name="div">1:鏅�歀og,-1:鑷村懡閿欒Log,2:鐗规畩Log</param>
         /// <param name="strLog">Log鍐呭</param>
         public void WriteLog(int div, string strLog)
         {
             lock (objLock)
             {
-                if (div != -1 && UserCenterResourse.HideOption.DetailedLog == 0)
+                if (div != -1 && div != 2 && UserCenterResourse.HideOption.DetailedLog == 0)
                 {
                     //鏆傛椂鍙褰曞紓甯镐俊鎭�
                     return;
@@ -71,9 +71,17 @@
                 System.IO.StreamWriter sw = null;
                 try
                 {
-                    string fileName = this.GetLogFile(div);
-                    string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.LogDirectory, fileName);
-                    strLog = "[" + DateTime.Now.ToString("yyyyMMdd HH:mm:ss") + "] " + strLog + "\r\n";
+                    string fullName = string.Empty;
+                    if (div != 2)
+                    {
+                        string fileName = this.GetLogFile(div);
+                        fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.LogDirectory, fileName);
+                    }
+                    else
+                    {
+                        fullName = DirNameResourse.SendAndReceveDataLog;
+                    }
+                    strLog = "\r\n[" + DateTime.Now.ToString("yyyyMMdd HH:mm:ss") + "] " + strLog + "\r\n";
                     sw = new System.IO.StreamWriter(fullName, true, Encoding.UTF8);
                     sw.WriteLine(strLog);
                 }

--
Gitblit v1.8.0