private static void RegisterLogFunction(string logString, string stackTrace, LogType type) { #if (UNITY_IPHONE || UNITY_IOS) && !UNITY_EDITOR if (Application.platform == RuntimePlatform.IPhonePlayer) { CrasheyeForIOS.SaveLogger(logString); } if (CrasheyeForIOS.GetLoggingLines() > 0 && Application.platform == RuntimePlatform.IPhonePlayer && (type == LogType.Assert || type == LogType.Exception) ) { CrasheyeForIOS.addLog(CrasheyeForIOS.GetLogger()); } #endif if (m_RegisterLog != null) { m_RegisterLog(logString, stackTrace, type); } #if (UNITY_IPHONE || UNITY_IOS) && !UNITY_EDITOR if (CrasheyeForIOS.GetLoggingLines() > 0 && Application.platform == RuntimePlatform.IPhonePlayer && (type == LogType.Assert || type == LogType.Exception) ) { CrasheyeForIOS.removeLog(); } #endif }
public static void SaveLogger(string logMsg) { if (CrasheyeForIOS.GetLoggingLines() <= 0) { return; } if (logMsg.IndexOf(CrasheyeForIOS.GetLoggingFilter()) < 0) { return; } if (m_saveLog.Count >= CrasheyeForIOS.GetLoggingLines() && m_saveLog.Count > 0) { m_saveLog.Dequeue(); } m_saveLog.Enqueue(logMsg); }