From 7e863a33397f317ffc3ffd9288496d0e4f16aa66 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 12 十二月 2019 14:58:20 +0800
Subject: [PATCH] 合并了新代码

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs
index 12b2406..c3c9468 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs
@@ -43,10 +43,12 @@
         /// Log鍑哄姏
         /// </summary>
         /// <param name="ex"></param>
-        public void WriteLog(Exception ex)
+        /// <param name="appendMsg">闄勫姞娑堟伅</param>
+        public void WriteLog(Exception ex, string appendMsg = "")
         {
             //Log鍑哄姏
-            string msg = ex.Message + "\r\n";
+            string msg = appendMsg == "" ? string.Empty : appendMsg + "\r\n";
+            msg += ex.Message + "\r\n";
             msg += ex.StackTrace;
             this.WriteLog(-1, msg);
         }
@@ -60,11 +62,11 @@
         {
             lock (objLock)
             {
-                //if (div != -1)
-                //{
-                //    //鏆傛椂鍙褰曞紓甯镐俊鎭�
-                //    return;
-                //}
+                if (div != -1 && UserCenterResourse.HideOption.DetailedLog == 0)
+                {
+                    //鏆傛椂鍙褰曞紓甯镐俊鎭�
+                    return;
+                }
                 //Log鏂囦欢
                 System.IO.StreamWriter sw = null;
                 try
@@ -95,13 +97,13 @@
             string fileName = DateTime.Now.ToString("yyyyMMdd");
             if (div == -1)
             {
-                fileName += "Log";
+                fileName += "Error";
             }
             else if (div == 1)
             {
-                fileName += "Error";
+                fileName += "Log";
             }
-            fileName = UserCenterLogic.EncryptPassword("4^Olh_3f", fileName);
+            fileName = UserCenterLogic.EncryptPassword(UserCenterResourse.FileEncryptKey, fileName);
             return fileName;
         }
         #endregion

--
Gitblit v1.8.0