From 1b0032c25fb0d5cc82c3a7b3cc8a178b979be653 Mon Sep 17 00:00:00 2001 From: Uwe Seimet Date: Wed, 25 Aug 2021 13:39:08 +0200 Subject: [PATCH] Renaming --- src/raspberrypi/rascsi.cpp | 20 ++++++++++---------- src/raspberrypi/rascsi_interface.proto | 2 +- src/raspberrypi/rasctl.cpp | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/raspberrypi/rascsi.cpp b/src/raspberrypi/rascsi.cpp index 942111d1..9cb3104e 100644 --- a/src/raspberrypi/rascsi.cpp +++ b/src/raspberrypi/rascsi.cpp @@ -61,7 +61,7 @@ int monsocket; // Monitor Socket pthread_t monthread; // Monitor Thread pthread_mutex_t ctrl_mutex; // Semaphore for the ctrl array static void *MonThread(void *param); -vector available_log_levels; +vector log_levels; string current_log_level; // Some versions of spdlog do not support get_log_level() string default_image_folder; set files_in_use; @@ -519,8 +519,8 @@ void LogDevices(const string& devices) void GetLogLevels(PbServerInfo& serverInfo) { - for (auto it = available_log_levels.begin(); it != available_log_levels.end(); ++it) { - serverInfo.add_available_log_levels(*it); + for (auto it = log_levels.begin(); it != log_levels.end(); ++it) { + serverInfo.add_log_levels(*it); } } @@ -1245,13 +1245,13 @@ int main(int argc, char* argv[]) setvbuf(stdout, NULL, _IONBF, 0); struct sched_param schparam; - available_log_levels.push_back("trace"); - available_log_levels.push_back("debug"); - available_log_levels.push_back("info"); - available_log_levels.push_back("warn"); - available_log_levels.push_back("err"); - available_log_levels.push_back("critical"); - available_log_levels.push_back("off"); + log_levels.push_back("trace"); + log_levels.push_back("debug"); + log_levels.push_back("info"); + log_levels.push_back("warn"); + log_levels.push_back("err"); + log_levels.push_back("critical"); + log_levels.push_back("off"); SetLogLevel("info"); // Create a thread-safe stdout logger to process the log messages diff --git a/src/raspberrypi/rascsi_interface.proto b/src/raspberrypi/rascsi_interface.proto index 7eb772b3..4e469341 100644 --- a/src/raspberrypi/rascsi_interface.proto +++ b/src/raspberrypi/rascsi_interface.proto @@ -148,7 +148,7 @@ message PbResult { message PbServerInfo { string rascsi_version = 1; // Sorted by severity - repeated string available_log_levels = 2; + repeated string log_levels = 2; string current_log_level = 3; string default_image_folder = 4; // Supported device types and their properties diff --git a/src/raspberrypi/rasctl.cpp b/src/raspberrypi/rasctl.cpp index a3bdd77f..a410925d 100644 --- a/src/raspberrypi/rasctl.cpp +++ b/src/raspberrypi/rasctl.cpp @@ -181,13 +181,13 @@ void CommandServerInfo(const string& hostname, int port) cout << "rascsi server version: " << serverInfo.rascsi_version() << endl; - if (!serverInfo.available_log_levels_size()) { + if (!serverInfo.log_levels_size()) { cout << " No log level settings available" << endl; } else { cout << "rascsi log levels, sorted by severity:" << endl; - for (int i = 0; i < serverInfo.available_log_levels_size(); i++) { - cout << " " << serverInfo.available_log_levels(i) << endl; + for (int i = 0; i < serverInfo.log_levels_size(); i++) { + cout << " " << serverInfo.log_levels(i) << endl; } cout << "Current rascsi log level: " << serverInfo.current_log_level() << endl;