Index: sources/storage/Logger.h =================================================================== diff -u -re6ddf6840cdd5a09deaac1dcdcd7d70064dc6a09 -r630c0a7fe305de7fc1911df4022036c4b10e473e --- sources/storage/Logger.h (.../Logger.h) (revision e6ddf6840cdd5a09deaac1dcdcd7d70064dc6a09) +++ sources/storage/Logger.h (.../Logger.h) (revision 630c0a7fe305de7fc1911df4022036c4b10e473e) @@ -122,15 +122,16 @@ const char *_headerA = "TimeStamp,ID,SubSys,Name,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40"; const char *_headerD = "TimeStamp,Description"; - const quint16 _cachetimeout = 5 ; // seconds timeout until flushes, for slow traffics - quint16 _cacheCounter = _cachetimeout ; // seconds timeout counter - quint16 _cacheCount = 3000 ; // K message count - QAtomicInt _cacheIndex = eCache1; + const quint16 _cacheTimeout = 5 ; // seconds timeout until flushes, for slow traffics + quint16 _cacheCounter = _cacheTimeout ; // seconds timeout counter + quint16 _cacheCount = 2000 ; // K message count + QAtomicInt _cacheIndexA = eCache1; + QAtomicInt _cacheIndexD = eCache1; QStringList _cacheA[eCacheIndexCount]; QStringList _cacheD[eCacheIndexCount]; QElapsedTimer _flushElapsedA; QElapsedTimer _flushElapsedD; - + QElapsedTimer _flushElapsedT; QDir _dir; // The HSSerial is going to be the HD Serial always, @@ -211,6 +212,7 @@ QFutureWatcher _removeLogsWatcher; QFutureWatcher _flushLogsWatcherA; QFutureWatcher _flushLogsWatcherD; + QFutureWatcher _flushLogsWatcherT; QThread *_thread = nullptr; bool _init = false; @@ -333,6 +335,7 @@ */ void didFlushLogsA(bool vInProgress); void didFlushLogsD(bool vInProgress); + void didFlushLogsT(bool vInProgress); // ----- Available space is low private slots: @@ -346,14 +349,17 @@ void onLog (const QString &vContent, LogType vLogType, bool vTimestamp); bool concurrentFlushLogA(); bool concurrentFlushLogD(); + bool concurrentFlushLogT(); void onFlushLogsA(); void onFlushLogsD(); + void onFlushLogsT(); private: bool logOverflow (LogType vLogType); - int logSwitch (); + int logSwitch (int vCacheIndex); void logTimeout (); void log (const QString &vContent, LogType vLogType); int flush ( LogType vLogType); + int flushTimeout(); signals: /*!