1
0
Fork 0

GUI: limit log buffer to 100mb

This commit is contained in:
Duncan Ogilvie 2019-11-02 02:49:18 +01:00
parent 03c5406b4b
commit 6da9fc8b42
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 3 additions and 0 deletions

View File

@ -266,6 +266,9 @@ void LogView::addMsgToLogSlot(QByteArray msg)
if(redirectError)
msgUtf16.append(tr("fwrite() failed (GetLastError()= %1 ). Log redirection stopped.\n").arg(GetLastError()));
if(logBuffer.length() >= 1024 * 1024 * 100) // 100mb buffer limit
logBuffer.clear();
logBuffer.append(msgUtf16);
if(flushLog)
{