diff --git a/CHANGELOG.md b/CHANGELOG.md index f098e2fa35..214282d610 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Please mark all change in change log and use the issue from GitHub - \#2363 Update branch version ## Improvement +- \#2353 Remove log_config from code and scripts - \#2370 Clean compile warning - \#2381 Upgrade FAISS to 1.6.3 diff --git a/core/scripts/start_server.sh b/core/scripts/start_server.sh index 312cef86d6..15d2cf0872 100755 --- a/core/scripts/start_server.sh +++ b/core/scripts/start_server.sh @@ -1,4 +1,4 @@ #!/bin/bash -../bin/milvus_server -c ../conf/server_config.yaml -l ../conf/log_config.conf +../bin/milvus_server -c ../conf/server_config.yaml diff --git a/core/src/main.cpp b/core/src/main.cpp index 3a7f592227..e35010f374 100644 --- a/core/src/main.cpp +++ b/core/src/main.cpp @@ -64,7 +64,6 @@ main(int argc, char* argv[]) { print_banner(); static struct option long_options[] = {{"conf_file", required_argument, nullptr, 'c'}, - {"log_conf_file", required_argument, nullptr, 'l'}, {"help", no_argument, nullptr, 'h'}, {"daemon", no_argument, nullptr, 'd'}, {"pid_file", required_argument, nullptr, 'p'}, @@ -73,7 +72,7 @@ main(int argc, char* argv[]) { int option_index = 0; int64_t start_daemonized = 0; - std::string config_filename, log_config_file; + std::string config_filename; std::string pid_filename; std::string app_name = argv[0]; milvus::Status s; @@ -86,7 +85,7 @@ main(int argc, char* argv[]) { } int value; - while ((value = getopt_long(argc, argv, "c:l:p:dh", long_options, &option_index)) != -1) { + while ((value = getopt_long(argc, argv, "c:p:dh", long_options, &option_index)) != -1) { switch (value) { case 'c': { char* config_filename_ptr = strdup(optarg); @@ -95,13 +94,6 @@ main(int argc, char* argv[]) { std::cout << "Loading configuration from: " << config_filename << std::endl; break; } - case 'l': { - char* log_filename_ptr = strdup(optarg); - log_config_file = log_filename_ptr; - free(log_filename_ptr); - std::cout << "Initializing log config from: " << log_config_file << std::endl; - break; - } case 'p': { char* pid_filename_ptr = strdup(optarg); pid_filename = pid_filename_ptr; @@ -132,7 +124,7 @@ main(int argc, char* argv[]) { signal(SIGUSR2, milvus::server::SignalUtil::HandleSignal); signal(SIGTERM, milvus::server::SignalUtil::HandleSignal); - server.Init(start_daemonized, pid_filename, config_filename, log_config_file); + server.Init(start_daemonized, pid_filename, config_filename); s = server.Start(); if (s.ok()) { diff --git a/core/src/server/Server.cpp b/core/src/server/Server.cpp index b528d517cb..239be36313 100644 --- a/core/src/server/Server.cpp +++ b/core/src/server/Server.cpp @@ -47,12 +47,10 @@ Server::GetInstance() { } void -Server::Init(int64_t daemonized, const std::string& pid_filename, const std::string& config_filename, - const std::string& log_config_file) { +Server::Init(int64_t daemonized, const std::string& pid_filename, const std::string& config_filename) { daemonized_ = daemonized; pid_filename_ = pid_filename; config_filename_ = config_filename; - log_config_file_ = log_config_file; } void @@ -63,10 +61,6 @@ Server::Daemonize() { std::cout << "Milvus server run in daemonize mode"; - // std::string log_path(GetLogDirFullPath()); - // log_path += "zdb_server.(INFO/WARNNING/ERROR/CRITICAL)"; - // LOG_SERVER_INFO_ << "Log will be exported to: " + log_path); - pid_t pid = 0; // Fork off the parent process diff --git a/core/src/server/Server.h b/core/src/server/Server.h index 25d3535e42..01a8e82ba7 100644 --- a/core/src/server/Server.h +++ b/core/src/server/Server.h @@ -23,8 +23,7 @@ class Server { GetInstance(); void - Init(int64_t daemonized, const std::string& pid_filename, const std::string& config_filename, - const std::string& log_config_file); + Init(int64_t daemonized, const std::string& pid_filename, const std::string& config_filename); Status Start(); @@ -51,7 +50,6 @@ class Server { int pid_fd_ = -1; std::string pid_filename_; std::string config_filename_; - std::string log_config_file_; }; // Server } // namespace server diff --git a/core/start_server.sh b/core/start_server.sh index 50bf8b84a8..0ae47e6bdf 100755 --- a/core/start_server.sh +++ b/core/start_server.sh @@ -1,4 +1,4 @@ #!/bin/bash -./cmake_build/src/milvus_server -c ./conf/server_config.yaml -l ./conf/log_config.conf & +./cmake_build/src/milvus_server -c ./conf/server_config.yaml &