提交 239652ab 编写于 作者: C Cai Yudong 提交者: JinHai-CN

#2353 remove log_config (#2406)

* remove log_config from code and script
Signed-off-by: Nyudong.cai <yudong.cai@zilliz.com>

* update changelog
Signed-off-by: Nyudong.cai <yudong.cai@zilliz.com>

* update script
Signed-off-by: Nyudong.cai <yudong.cai@zilliz.com>
上级 89e1d5d2
......@@ -13,6 +13,7 @@ Please mark all change in change log and use the issue from GitHub
- \#2381 Upgrade to faiss_1.6.3
## Improvement
- \#2353 Remove log_config from code and scripts
- \#2370 Clean compile warning
- \#2381 Upgrade FAISS to 1.6.3
......
#!/bin/bash
../bin/milvus_server -c ../conf/server_config.yaml -l ../conf/log_config.conf
../bin/milvus_server -c ../conf/server_config.yaml
......@@ -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()) {
......
......@@ -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
......
......@@ -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
......
#!/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 &
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册