11 ref array<ref SCR_AIDebugMessage> m_aDebugMessages = {};
21 AddDebugMessageObject(msg);
29 m_aDebugMessages.Insert(msg);
42 if (ageThresholdMs != -1)
45 int timestampMsThreshold = System.GetTickCount() - ageThresholdMs;
46 for (
int i = m_aDebugMessages.Count() - 1; i >= 0; i--)
48 if (m_aDebugMessages[i].m_TimestampMs >= timestampMsThreshold)
56 const string strLine =
"----------------------------------------------------------------------------------";
58 LogToFile(
"\n\n\n\n");
60 LogToFile(
string.Format(
"Debug Message Dump for %1",
GetOwner()));
61 if (ageThresholdMs != -1)
62 LogToFile(
string.Format(
"Logging messages for past %1 milliseconds", ageThresholdMs));
64 int msgCount = m_aDebugMessages.Count();
65 for (
int i = idStart; i < msgCount; i++)
68 if (msg.m_Type == msgTypeFilter || !useTypeFilter)
69 LogToFile(msg.FormatMessage(), msg.m_LogLevel);
72 LogToFile(
"End Debug Message Dump");
74 LogToFile(
"\n\n\n\n");
78 protected void LogToFile(
string msg, LogLevel logLevel = LogLevel.NORMAL)