mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
Ref T773, clear log when written, set object name for logger
This commit is contained in:
committed by
Mat Sutcliffe
parent
f6c5e6f3cb
commit
a629b70724
@@ -45,7 +45,7 @@ namespace BlackMisc
|
||||
return cats;
|
||||
}
|
||||
|
||||
CWorker *CInterpolationLogger::writeLogInBackground()
|
||||
CWorker *CInterpolationLogger::writeLogInBackground(bool clearLog)
|
||||
{
|
||||
QList<SituationLog> situations;
|
||||
QList<PartsLog> parts;
|
||||
@@ -58,10 +58,13 @@ namespace BlackMisc
|
||||
parts = m_partsLogs;
|
||||
}
|
||||
|
||||
CWorker *worker = CWorker::fromTask(this, "WriteInterpolationLog", [situations, parts]()
|
||||
QPointer<CInterpolationLogger> myself(this);
|
||||
CWorker *worker = CWorker::fromTask(this, "WriteInterpolationLog", [situations, parts, myself, clearLog]()
|
||||
{
|
||||
const CStatusMessageList msg = CInterpolationLogger::writeLogFiles(situations, parts);
|
||||
CLogMessage::preformatted(msg);
|
||||
|
||||
if (clearLog && myself) { myself->clearLog(); }
|
||||
});
|
||||
return worker;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user