Improved logging of "adding aircraft" so we can see details such as the model string

This commit is contained in:
Klaus Basan
2019-08-11 20:05:16 +02:00
committed by Mat Sutcliffe
parent d947baf344
commit 26afc5160d
8 changed files with 18 additions and 5 deletions

View File

@@ -174,7 +174,7 @@ namespace BlackCore
if (!enabled) { m_aircraftCallsignTimestamps[callsign] = timeoutAircraftEpochMs + 1000; } // fake value so it can be re-enabled
const qint64 tsv = m_aircraftCallsignTimestamps.value(callsign);
if (tsv > timeoutAircraftEpochMs) { continue; }
CLogMessage(this).debug() << "Aircraft " << callsign.toQString() << "timed out! " << (currentTimeMsEpoch - tsv) << "ms";
CLogMessage(this).debug() << QStringLiteral("Aircraft '%1' timed out after %2ms").arg(callsign.toQString()).arg(currentTimeMsEpoch - tsv);
m_aircraftCallsignTimestamps.remove(callsign);
emit this->timeoutAircraft(callsign);
}
@@ -185,7 +185,7 @@ namespace BlackCore
if (!enabled) { m_aircraftCallsignTimestamps[callsign] = timeoutAtcEpochMs + 1000; } // fake value so it can be re-enabled
const qint64 tsv = m_aircraftCallsignTimestamps.value(callsign);
if (m_atcCallsignTimestamps.value(callsign) > timeoutAtcEpochMs) { continue; }
CLogMessage(this).debug() << "ATC " << callsign.toQString() << "timed out! " << (currentTimeMsEpoch - tsv) << "ms";
CLogMessage(this).debug() << QStringLiteral("ATC '%1' timed out after %2ms").arg(callsign.toQString()).arg(currentTimeMsEpoch - tsv);
m_atcCallsignTimestamps.remove(callsign);
emit this->timeoutAtc(callsign);
}