public static void HandleLog(string logString, string stackTrace, LogType type)
        {
            if (logString.StartsWith("[Physics.PhysX] RigidBody::setRigidBodyFlag"))
            {
                return;
            }
            if (GA_Debug._showLogOnGUI)
            {
                if (GA_Debug.Messages == null)
                {
                    GA_Debug.Messages = new List <string>();
                }
                GA_Debug.Messages.Add(logString);
            }
            if (!GameAnalytics.SettingsGA.SubmitErrors || GA_Debug._errorCount >= GA_Debug.MaxErrorCount || type == 3)
            {
                return;
            }
            if (string.IsNullOrEmpty(stackTrace))
            {
                stackTrace = new StackTrace().ToString();
            }
            ++GA_Debug._errorCount;
            string message = logString.Replace('"', '\'').Replace('\n', ' ').Replace('\r', ' ') + " " + stackTrace.Replace('"', '\'').Replace('\n', ' ').Replace('\r', ' ');

            if (message.Length > 8192)
            {
                message = message.Substring(8192);
            }
            GA_Debug.SubmitError(message, type);
        }
Exemple #2
0
 public static void HandleLog(string logString, string stackTrace, LogType type)
 {
     if (logString.StartsWith("[Physics.PhysX] RigidBody::setRigidBodyFlag"))
     {
         return;
     }
     if (GA_Debug._showLogOnGUI)
     {
         if (GA_Debug.Messages == null)
         {
             GA_Debug.Messages = new List <string>();
         }
         GA_Debug.Messages.Add(logString);
     }
     if (GameAnalytics.SettingsGA.SubmitErrors && GA_Debug._errorCount < GA_Debug.MaxErrorCount && type != LogType.Log)
     {
         if (string.IsNullOrEmpty(stackTrace))
         {
             stackTrace = (new StackTrace()).ToString();
         }
         GA_Debug._errorCount++;
         string str  = logString.Replace('\"', '\'').Replace('\n', ' ').Replace('\r', ' ');
         string str1 = stackTrace.Replace('\"', '\'').Replace('\n', ' ').Replace('\r', ' ');
         string str2 = string.Concat(str, " ", str1);
         if (str2.Length > 8192)
         {
             str2 = str2.Substring(8192);
         }
         GA_Debug.SubmitError(str2, type);
     }
 }
Exemple #3
0
 // Token: 0x0600013A RID: 314 RVA: 0x0000A9B8 File Offset: 0x00008DB8
 public static void HandleLog(string logString, string stackTrace, LogType type)
 {
     if (GA_Debug._showLogOnGUI)
     {
         if (GA_Debug.Messages == null)
         {
             GA_Debug.Messages = new List <string>();
         }
         GA_Debug.Messages.Add(logString);
     }
     if (GameAnalytics.SettingsGA.SubmitErrors && GA_Debug._errorCount < GA_Debug.MaxErrorCount && type != LogType.Log)
     {
         GA_Debug._errorCount++;
         string str  = logString.Replace('"', '\'').Replace('\n', ' ').Replace('\r', ' ');
         string str2 = stackTrace.Replace('"', '\'').Replace('\n', ' ').Replace('\r', ' ');
         GA_Debug.SubmitError(str + " " + str2, type);
     }
 }