refs #865, further improved logging

* set log flag in hints, so no lock for each aircraft is needed
* as a result log functions have a bool log parameter now
* highlight situation and parts changed
This commit is contained in:
Klaus Basan
2017-01-28 02:58:55 +01:00
committed by Mathew Sutcliffe
parent ff7756db38
commit 62d4a94106
11 changed files with 133 additions and 78 deletions

View File

@@ -67,7 +67,6 @@ namespace BlackMisc
// interpolation situations
CAircraftSituation oldSituation;
CAircraftSituation newSituation;
const bool logInterpolation = setup.getLogCallsigns().contains(callsign);
InterpolationLog log;
// latest first, now 00:20 split time
@@ -215,7 +214,7 @@ namespace BlackMisc
status.setChangedPosition(true);
}
status.setInterpolationSucceeded(true);
if (logInterpolation)
if (hints.isLoggingInterpolation())
{
log.timestamp = currentTimeMsSinceEpoc;
log.callsign = callsign;
@@ -224,6 +223,7 @@ namespace BlackMisc
log.oldSituation = oldSituation;
log.newSituation = newSituation;
log.useParts = hints.hasAircraftParts();
log.parts = hints.getAircraftParts();
this->logInterpolation(log);
}