Index: sources/storage/Logger.h =================================================================== diff -u -r5687815256ae070a9a207107088e3f72dd464da0 -r45a6996f6643db2f20520ba60e952c647b2d0501 --- sources/storage/Logger.h (.../Logger.h) (revision 5687815256ae070a9a207107088e3f72dd464da0) +++ sources/storage/Logger.h (.../Logger.h) (revision 45a6996f6643db2f20520ba60e952c647b2d0501) @@ -108,7 +108,8 @@ // The HSSerial is going to be the HD Serial always, // but while booting the logger is initialized first before the HD sends its serial number. // therefore during the bootup and POST that we don't have the serial, will use BootPOST. - QString _logFileNameHDSN = "BootPOST" ; + const QString _logFileNameHDSN_default = "BootPOST" ; + QString _logFileNameHDSN = _logFileNameHDSN_default ; // The Mode is the device main states comming from HD_OpMode // this is not exactly the HD_OpModes and will be interpreted in desired cycles. @@ -146,7 +147,7 @@ }; const char * _logFileNamePendingSubExt = "u."; - const char * _logFileNameCompressExt = ".gz"; + const char * _logFileNameCompressExt = Storage::gzipExt; const TLogData _logFileNameExt { { LogType::eLogAppED, ".log" }, // Application log { LogType::eLogDebug, ".err" }, // Application error @@ -189,10 +190,6 @@ return _logFileNamePendingSubExt; } - QString logFileNameCompressExt() { - return _logFileNameCompressExt; - } - QString logFileNameExt ( LogType vLogType ) { return _logFileNameExt[vLogType]; } @@ -201,6 +198,21 @@ return _logPathNames[vLogType]; } + QString logFileNameHDSN() { + return _logFileNameHDSN; + } + + QString fileSeparator() { + return _fileSeparator; + } + QString logFileNameHDSN_default() { + return _logFileNameHDSN_default; + } + + bool isBootPOST(const QString &vFileName) { + return vFileName.contains(_Logger.logFileNameHDSN_default()); + } + /*! * \brief logFileNameExt_AD * \details Finds the type of the log by log file extention. @@ -239,7 +251,7 @@ signals: void didLogPathSet ( Logger::LogType vLogType, const QString &vLogPath ); void didLogIOFail (); - void didLogBackup ( const QString vFileName ); + void didLogBackup ( const QString &vFileName ); void didRetentionLogCS ( quint8 vPercent );