| | |
| | | return 0; |
| | | } |
| | | |
| | | ns_log::AddLog("/tmp/bhshmq_center.log", true, true); |
| | | ns_log::AddLog("/tmp/bhshmq_center.log"); |
| | | auto lvl = args.Get("log", "info"); |
| | | if (strcasecmp(lvl.c_str(), "trace") == 0) { ns_log::ResetLogLevel(ns_log::LogLevel::trace); } |
| | | if (strcasecmp(lvl.c_str(), "debug") == 0) { ns_log::ResetLogLevel(ns_log::LogLevel::debug); } |
| | |
| | | if (strcasecmp(lvl.c_str(), "fatal") == 0) { ns_log::ResetLogLevel(ns_log::LogLevel::fatal); } |
| | | |
| | | auto &shm = BHomeShm(); |
| | | if (!CenterInit(shm)) { |
| | | LOG_FATAL() << "init memory error."; |
| | | exit(0); |
| | | } |
| | | GlobalInit(shm); |
| | | |
| | | InstanceFlag inst(shm, kCenterRunningFlag); |