Index: sources/storage/Logger.h =================================================================== diff -u -r627b97843f87f5ca8fbd731c6c4a6d9fae4352ce -r7ebc073150532073ae7f1a0e768272bcff5d6fb3 --- sources/storage/Logger.h (.../Logger.h) (revision 627b97843f87f5ca8fbd731c6c4a6d9fae4352ce) +++ sources/storage/Logger.h (.../Logger.h) (revision 7ebc073150532073ae7f1a0e768272bcff5d6fb3) @@ -26,7 +26,9 @@ // Define #define _Logger Storage::Logger::I() -#define LOG_EXPORT _Logger.concurrentExportLogs() +#define LOG_EXPORTLOG _Logger.concurrentExportLogs() +#define LOG_EXPORTERR _Logger.concurrentExportErrs() +#define LOG_EXPORTTRT _Logger.concurrentExportTrts() #define ADD_EVENT_HEADER emit Storage::Logger::I().didLog(_headerE, Storage::Logger::LogType::eLogEvent, false) #define LOG_EVENT(vCONTENT) emit Storage::Logger::I().didLog(vCONTENT, Storage::Logger::LogType::eLogEvent, true ) @@ -80,6 +82,8 @@ public : enum LogType { + eLogNone = -1, + eLogDebug, ///< Application Error : CANBus messages does not have error it's Event/Data only eLogEvent, ///< Massages on the CANBus : Error is an event type @@ -109,6 +113,12 @@ { LogType::eLogDebug, "" }, // it has its own file and all the content is Error }; + const QHash _logNames { // Will be used for the logging in the file + { LogType::eLogEvent, "Log" }, + { LogType::eLogDatum, "Service" }, + { LogType::eLogDebug, "Treatment" }, // it has its own file and all the content is Error + }; + const QHash _logFileNameExt { { LogType::eLogEvent, ".log" }, #ifdef MIXED_EVENT_DATUM @@ -147,6 +157,7 @@ QString _logFileName = ""; QMutex _logRemoveRunning; + LogType _exportLogsType = eLogNone; QFutureWatcher _exportLogsWatcher; QFutureWatcher _removeLogsWatcher; @@ -185,9 +196,14 @@ // ----- Export structure private : bool exportLogs(); + bool exportErrs(); + bool exportTrts(); public slots: // this slot is thread safe and can be called from outside by LOG_EXPORT. - bool concurrentExportLogs(); - void onExportLogs(); + bool concurrentExportIsOk (); + bool concurrentExportLogs (); + bool concurrentExportErrs (); + bool concurrentExportTrts (); + void onExportLogs (); signals: void didExportLogs();