Commit 239652ab authored by 蔡宇东's avatar 蔡宇东 Committed by JinHai-CN
Browse files

#2353 remove log_config (#2406)



* remove log_config from code and script

Signed-off-by: default avataryudong.cai <yudong.cai@zilliz.com>

* update changelog

Signed-off-by: default avataryudong.cai <yudong.cai@zilliz.com>

* update script

Signed-off-by: default avataryudong.cai <yudong.cai@zilliz.com>
parent 89e1d5d2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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

+1 −1
Original line number Diff line number Diff line
#!/bin/bash

../bin/milvus_server -c ../conf/server_config.yaml -l ../conf/log_config.conf
../bin/milvus_server -c ../conf/server_config.yaml
+3 −11
Original line number Diff line number Diff line
@@ -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()) {
+1 −7
Original line number Diff line number Diff line
@@ -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
+1 −3
Original line number Diff line number Diff line
@@ -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
Loading