Пример #1
0
        private void UpdateAllLogDatas(ConsoleLogData consoleLogData)
        {
            if (consoleLogData == null)
            {
                return;
            }

            m_allLogDatas.Add(consoleLogData);

            switch (consoleLogData.LogType)
            {
            case LogType.Log:
                m_allLogCount++;
                break;

            case LogType.Warning:
                m_allWarningCount++;
                break;

            case LogType.Error:
            case LogType.Exception:
            case LogType.Assert:
                m_allErrorCount++;
                break;
            }
        }
Пример #2
0
 private void UpdateLogDatas(ConsoleLogData consoleLogData = null)
 {
     UpdateAllLogDatas(consoleLogData);
     UpdateCollapseLogDatas(consoleLogData);
     UpdateToggleLogDatas();
     UpdateFilterLogDatas();
 }
Пример #3
0
        private void UpdateToggleLogDatas()
        {
            List <ConsoleLogData> consoleLogDatas = new List <ConsoleLogData>();

            if (m_collapseToggle)
            {
                consoleLogDatas.AddRange(m_collapseLogDatas);
            }
            else
            {
                consoleLogDatas.AddRange(m_allLogDatas);
            }

            m_toggleLogDatas.Clear();

            ConsoleLogData cacheData = null;

            for (int i = 0; i < consoleLogDatas.Count; i++)
            {
                cacheData = consoleLogDatas[i];
                switch (cacheData.LogType)
                {
                case LogType.Log:
                    if (m_logToggle)
                    {
                        m_toggleLogDatas.Add(cacheData);
                    }
                    break;

                case LogType.Warning:
                    if (m_warningToggle)
                    {
                        m_toggleLogDatas.Add(cacheData);
                    }
                    break;

                case LogType.Error:
                case LogType.Exception:
                case LogType.Assert:
                    if (m_errorToggle)
                    {
                        m_toggleLogDatas.Add(cacheData);
                    }
                    break;
                }
            }
        }
Пример #4
0
        private void UpdateCollapseLogDatas(ConsoleLogData consoleLogData)
        {
            if (consoleLogData == null)
            {
                return;
            }

            ConsoleLogData cacheData = m_collapseLogDatas.Find((ConsoleLogData obj) => obj.LogString == consoleLogData.LogString && obj.StackTrace == consoleLogData.StackTrace && obj.LogType == consoleLogData.LogType);

            if (cacheData != null)
            {
                cacheData.CollapseCount++;
            }
            else
            {
                cacheData = consoleLogData;
                cacheData.CollapseCount = 1;
                m_collapseLogDatas.Add(cacheData);

                switch (consoleLogData.LogType)
                {
                case LogType.Log:
                    m_collapsedLogCount++;
                    break;

                case LogType.Warning:
                    m_collapsedWarningCount++;
                    break;

                case LogType.Error:
                case LogType.Exception:
                case LogType.Assert:
                    m_collapsedErrorCount++;
                    break;
                }
            }
        }