Index: sources/storage/Logger.h =================================================================== diff -u -r3561f79af1a92356eea01d5d0c3297c69d2ecdf2 -r86e9dfbff50cb7e16fd94c16c1c818cef3b47eac --- sources/storage/Logger.h (.../Logger.h) (revision 3561f79af1a92356eea01d5d0c3297c69d2ecdf2) +++ sources/storage/Logger.h (.../Logger.h) (revision 86e9dfbff50cb7e16fd94c16c1c818cef3b47eac) @@ -7,7 +7,7 @@ * * \file Logger.h * \author (last) Behrouz NematiPour - * \date (last) 22-Sep-2021 + * \date (last) 28-Mar-2022 * \author (original) Behrouz NematiPour * \date (original) 26-Aug-2020 * @@ -99,10 +99,10 @@ QString _logFileNamePrefix; QHash _logPathNames; const QHash _logBasePathNames { - { LogType::eLogEvent, "log/" }, - { LogType::eLogDatum, "log/" }, - { LogType::eLogDebug, "service/" }, - { LogType::eLogTrtmt, Storage::Treatment_Log_Folder }, + { LogType::eLogEvent, Storage::Log_Folder_Event }, + { LogType::eLogDatum, Storage::Log_Folder_Data }, + { LogType::eLogDebug, Storage::Log_Folder_Service }, + { LogType::eLogTrtmt, Storage::Log_Folder_Treatment }, }; const QHash _logPrefix { // Will be used for the logging in the file @@ -126,14 +126,16 @@ // 1 - Since now both the Log and Datum are in the same place and file they have same percentage. // if separated then the percentage has to be separated // 2 - the total in _logTypeExpiryDay is not 100 and it has to be summed up with Storage::Available_Space_Percent. - // so it is 70% for Event/Datum + 15% Service + 15% free = 100% total + // so it is 50% for Event/Datum + 15% Service + 35% free = 100% total + // If the available SD-Card size is < Storage::Available_Space_Percent( 15 ) the remove logger will remove any of log types to retain percentage for each (50 for log, 15 for servc) + // The deletion will continue to get 35% free space, as has been calculated above. const QHash _logTypeMaxUsageLimit { #ifdef MIXED_EVENT_DATUM - { LogType::eLogEvent, 70 }, // in percent - { LogType::eLogDatum, 70 }, // in percent + { LogType::eLogEvent, 50 }, // in percent + { LogType::eLogDatum, 50 }, // in percent #else - { LogType::eLogEvent, 35 }, // in percent - { LogType::eLogDatum, 35 }, // in percent + { LogType::eLogEvent, 25 }, // in percent + { LogType::eLogDatum, 25 }, // in percent #endif { LogType::eLogDebug, 15 }, // in percent // Not Sure yet so commented out in the remove.