MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / refreshLogText

Method refreshLogText

Engine/source/gui/controls/guiConsole.cpp:102–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102void GuiConsole::refreshLogText()
103{
104 U32 size;
105 ConsoleLogEntry *log;
106
107 Con::getLockLog(log, size);
108
109 if (mFilteredLog.size() != size || mFiltersDirty)
110 {
111 mFilteredLog.clear();
112
113 U32 errorCount = 0;
114 U32 warnCount = 0;
115 U32 normalCount = 0;
116
117 //Filter the log if needed
118 for (U32 i = 0; i < size; ++i)
119 {
120 ConsoleLogEntry &entry = log[i];
121
122 if (entry.mLevel == ConsoleLogEntry::Error)
123 {
124 errorCount++;
125 if (mDisplayErrors)
126 {
127 mFilteredLog.push_back(entry);
128 }
129 }
130 else if (entry.mLevel == ConsoleLogEntry::Warning)
131 {
132 warnCount++;
133 if (mDisplayWarnings)
134 {
135 mFilteredLog.push_back(entry);
136 }
137 }
138 else if (entry.mLevel == ConsoleLogEntry::Normal)
139 {
140 normalCount++;
141 if (mDisplayNormalMessages)
142 {
143 mFilteredLog.push_back(entry);
144 }
145 }
146 }
147
148 onNewMessage_callback(errorCount, warnCount, normalCount);
149 }
150
151 Con::unlockLog();
152}
153
154//-----------------------------------------------------------------------------
155

Callers

nothing calls this directly

Calls 5

getLockLogFunction · 0.85
unlockLogFunction · 0.85
sizeMethod · 0.45
clearMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected