From 38eca0c64b7749904461ff4748235e0a0982da6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Thu, 9 Sep 2021 22:06:01 +0200 Subject: [PATCH] logger: start session & log index at 100 To avoid leading zeros, as the events interface does not support that (yet) --- src/modules/logger/logger.cpp | 2 +- src/modules/logger/util.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/logger/logger.cpp b/src/modules/logger/logger.cpp index b0533d5284..5fc51a59ab 100644 --- a/src/modules/logger/logger.cpp +++ b/src/modules/logger/logger.cpp @@ -1290,7 +1290,7 @@ int Logger::get_log_file_name(LogType type, char *file_name, size_t file_name_si return -1; } - uint16_t file_number = 1; // start with file log001 + uint16_t file_number = 100; // start with file log100 /* look for the next file that does not exist */ while (file_number <= MAX_NO_LOGFILE) { diff --git a/src/modules/logger/util.cpp b/src/modules/logger/util.cpp index 799df123bc..1d00efacc7 100644 --- a/src/modules/logger/util.cpp +++ b/src/modules/logger/util.cpp @@ -138,7 +138,7 @@ int check_free_space(const char *log_root_dir, int32_t max_log_dirs_to_keep, orb // There are 2 directory naming schemes: sess or --. // For both we find the oldest and then remove the one which has more directories. - int year_min = 10000, month_min = 99, day_min = 99, sess_idx_min = 99999999, sess_idx_max = 0; + int year_min = 10000, month_min = 99, day_min = 99, sess_idx_min = 99999999, sess_idx_max = 99; while ((result = readdir(dp))) { int year, month, day, sess_idx;