mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-24 12:30:20 +00:00
Renaming
This commit is contained in:
parent
355816964d
commit
1b0032c25f
@ -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<string> available_log_levels;
|
||||
vector<string> log_levels;
|
||||
string current_log_level; // Some versions of spdlog do not support get_log_level()
|
||||
string default_image_folder;
|
||||
set<string> 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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user