From 99a3f198578f79b48bca1821554fb4b76270cd27 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 14 八月 2018 16:56:13 +0800
Subject: [PATCH] 2541  优化日志工具和bugly工具

---
 System/AssetVersion/RemoteFile.cs |   62 +++++++++++++++---------------
 1 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/System/AssetVersion/RemoteFile.cs b/System/AssetVersion/RemoteFile.cs
index 069e94e..4467c58 100644
--- a/System/AssetVersion/RemoteFile.cs
+++ b/System/AssetVersion/RemoteFile.cs
@@ -234,7 +234,7 @@
         }
         catch (Exception ex)
         {
-            DesignDebug.LogError(ex.Message);
+            DebugEx.LogError(ex.Message);
             ret = false;
         }
 #endif
@@ -314,7 +314,7 @@
                     }
                     catch (Exception ex)
                     {
-                        DesignDebug.LogWarning("ERROR: " + ex);
+                        DebugEx.LogWarning("ERROR: " + ex);
                         mHadError = true;
                     }
                     finally
@@ -332,8 +332,8 @@
         }
         catch (WebException webEx)
         {
-            DesignDebug.LogWarning("<color=red>Request File Head ERROR: " + mRemoteFile + "</color>");
-            DesignDebug.LogWarning("ERROR: " + webEx);
+            DebugEx.LogWarning("<color=red>Request File Head ERROR: " + mRemoteFile + "</color>");
+            DebugEx.LogWarning("ERROR: " + webEx);
             mHadError = true;
             gDownloadIsRunningCount--;
             done = true;
@@ -341,8 +341,8 @@
         }
         catch (System.Exception e)
         {
-            DesignDebug.LogWarning("<color=red>Request File Head ERROR: " + mRemoteFile + "</color>");
-            DesignDebug.LogWarning("ERROR: " + e);
+            DebugEx.LogWarning("<color=red>Request File Head ERROR: " + mRemoteFile + "</color>");
+            DebugEx.LogWarning("ERROR: " + e);
             mHadError = true;
             gDownloadIsRunningCount--;
             done = true;
@@ -364,7 +364,7 @@
             float dur = System.Environment.TickCount - tick1;
             if (dur > timeOut)
             {
-                DesignDebug.LogWarningFormat("鑾峰彇杩滅▼鏂囦欢{0} 淇℃伅瓒呮椂!", mRemoteFile);
+                DebugEx.LogWarningFormat("鑾峰彇杩滅▼鏂囦欢{0} 淇℃伅瓒呮椂!", mRemoteFile);
                 mHadError = true;
                 break;
             }
@@ -372,7 +372,7 @@
         }
         if (mHadError)
         {
-            DesignDebug.LogWarningFormat("鑾峰彇杩滅▼鏂囦欢{0} 淇℃伅澶辫触!", mRemoteFile);
+            DebugEx.LogWarningFormat("鑾峰彇杩滅▼鏂囦欢{0} 淇℃伅澶辫触!", mRemoteFile);
             headRequest.Abort();
             done = true;
             gDownloadIsRunningCount--;
@@ -396,10 +396,10 @@
             }
             else if (localFileSize > mRemoteFileSize || outDated)
             {
-                if (!outDated) DesignDebug.LogWarning("Local file is larger than remote file, but not outdated. PANIC!");
+                if (!outDated) DebugEx.LogWarning("Local file is larger than remote file, but not outdated. PANIC!");
                 if (outDated)
                 {
-                    DesignDebug.LogWarning(mLocalFileTemp + " Local file is outdated, deleting");
+                    DebugEx.LogWarning(mLocalFileTemp + " Local file is outdated, deleting");
                 }
                 try
                 {
@@ -408,8 +408,8 @@
                 }
                 catch (System.Exception e)
                 {
-                    DesignDebug.LogWarning("<color=red>Could not delete local file</color>");
-                    DesignDebug.LogError(e);
+                    DebugEx.LogWarning("<color=red>Could not delete local file</color>");
+                    DebugEx.LogError(e);
                 }
 
                 while (File.Exists(mLocalFileTemp))
@@ -441,8 +441,8 @@
             }
             catch (System.Exception e)
             {
-                DesignDebug.LogWarning("<color=red>Could not delete local file</color>");
-                DesignDebug.LogWarning(e);
+                DebugEx.LogWarning("<color=red>Could not delete local file</color>");
+                DebugEx.LogWarning(e);
             }
             while (File.Exists(localFile))
             {
@@ -489,8 +489,8 @@
         }
         catch (System.Exception ex)
         {
-            DesignDebug.LogWarning("BeginGetResponse exception: " + ex.Message);
-            DesignDebug.LogWarning(ex);
+            DebugEx.LogWarning("BeginGetResponse exception: " + ex.Message);
+            DebugEx.LogWarning(ex);
             if (fileRequest != null)
             {
                 fileRequest.Abort();
@@ -518,7 +518,7 @@
             float dur = System.Environment.TickCount - tick1;
             if (dur > timeOut)
             {
-                DesignDebug.LogWarningFormat("涓嬭浇杩滅▼鏂囦欢{0} 瓒呮椂!", mRemoteFile);
+                DebugEx.LogWarningFormat("涓嬭浇杩滅▼鏂囦欢{0} 瓒呮椂!", mRemoteFile);
                 mHadError = true;
                 break;
             }
@@ -527,7 +527,7 @@
 
         if (mHadError)
         {
-            DesignDebug.LogWarningFormat("[RemoteFile] 杩滅▼鏂囦欢{0} 涓嬭浇澶辫触! ", localFile);
+            DebugEx.LogWarningFormat("[RemoteFile] 杩滅▼鏂囦欢{0} 涓嬭浇澶辫触! ", localFile);
             if (fileRequest != null)
             {
                 fileRequest.Abort();
@@ -557,8 +557,8 @@
         }
         catch (Exception ex)
         {
-            DesignDebug.LogWarning("<color=red>ERROR: " + mRemoteFile + "</color>");
-            DesignDebug.LogWarning(ex);
+            DebugEx.LogWarning("<color=red>ERROR: " + mRemoteFile + "</color>");
+            DebugEx.LogWarning(ex);
             if (inStream != null)
             {
                 inStream.Close();
@@ -596,7 +596,7 @@
                 if (dura > timeOut)
                 {
                     fileWriteState = FileWriteState.Timeout;
-                    DesignDebug.LogWarningFormat("[RemoteFile] 杩滅▼鏂囦欢{0} 璇诲彇瓒呮椂{1}!", mRemoteFile, dura);
+                    DebugEx.LogWarningFormat("[RemoteFile] 杩滅▼鏂囦欢{0} 璇诲彇瓒呮椂{1}!", mRemoteFile, dura);
                     break;
                 }
             }
@@ -610,7 +610,7 @@
         }
         if (fileWriteState == FileWriteState.Error || fileWriteState == FileWriteState.Timeout)
         {
-            DesignDebug.LogWarningFormat("[RemoteFile] 杩滅▼鏂囦欢{0} 涓嬭浇澶辫触! ", localFile);
+            DebugEx.LogWarningFormat("[RemoteFile] 杩滅▼鏂囦欢{0} 涓嬭浇澶辫触! ", localFile);
             if (fileResponse != null)
             {
                 fileResponse.Close();
@@ -631,7 +631,7 @@
                 if (localTempFileInfo.Length != mRemoteFileSize && mRemoteFileSize != 0L)
                 {
                     mHadError = true;
-                    DesignDebug.LogError(string.Format(localFile + " 涓嬭浇瀹屾垚鍚�, 浣嗘槸澶у皬{0} 鍜岃繙绋嬫枃浠朵笉涓�鑷� {1}", localTempFileInfo.Length, mRemoteFileSize));
+                    DebugEx.LogError(string.Format(localFile + " 涓嬭浇瀹屾垚鍚�, 浣嗘槸澶у皬{0} 鍜岃繙绋嬫枃浠朵笉涓�鑷� {1}", localTempFileInfo.Length, mRemoteFileSize));
                 }
                 else
                 {  //澶у皬涓�鑷� 
@@ -651,7 +651,7 @@
         }
         catch (Exception ex)
         {
-            DesignDebug.LogError(ex);
+            DebugEx.LogError(ex);
             mHadError = true;
         }
     }
@@ -709,8 +709,8 @@
         {
             if (!processErroring)
             {
-                DesignDebug.LogWarning(ex);
-                DesignDebug.LogWarning("ReadDataCallback 寮傚父淇℃伅: " + ex.Message);
+                DebugEx.LogWarning(ex);
+                DebugEx.LogWarning("ReadDataCallback 寮傚父淇℃伅: " + ex.Message);
             }
             if (fs != null)
             {
@@ -745,29 +745,29 @@
         {
             if (result == null)
             {
-                DesignDebug.LogError("Asynch result is null!");
+                DebugEx.LogError("Asynch result is null!");
                 mHadError = true;
             }
 
             HttpWebRequest webRequest = (HttpWebRequest)result.AsyncState;
             if (webRequest == null)
             {
-                DesignDebug.LogError("Could not cast to web request");
+                DebugEx.LogError("Could not cast to web request");
                 mHadError = true;
             }
 
             fileResponse = webRequest.EndGetResponse(result) as HttpWebResponse;
             if (fileResponse == null)
             {
-                DesignDebug.LogError("Asynch response is null!");
+                DebugEx.LogError("Asynch response is null!");
                 mHadError = true;
             }
         }
         catch (Exception ex)
         {
             mHadError = true;
-            DesignDebug.LogWarning(ex);
-            DesignDebug.LogWarning("[RemoteFile] AsynchCallback 寮傚父: " + ex.Message);
+            DebugEx.LogWarning(ex);
+            DebugEx.LogWarning("[RemoteFile] AsynchCallback 寮傚父: " + ex.Message);
         }
     }
 #endif

--
Gitblit v1.8.0