| | |
| | | return 0; |
| | | } |
| | | |
| | | ns_log::AddLog("/opt/vasystem/valog/bhshmq_center.log"); |
| | | ns_log::AddLog(BHLogDir() + "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); } |
| | |
| | | static std::unique_ptr<TopicNode> ptr; |
| | | if (!ptr && GlobalInit(BHomeShm())) { |
| | | auto InitLog = []() { |
| | | auto id = GetProcExe(); |
| | | char path[200] = {0}; |
| | | sprintf(path, "/opt/vasystem/valog/bhshmq_node_%s.log", id.c_str()); |
| | | ns_log::AddLog(path); |
| | | ns_log::AddLog(BHLogDir() + "bhshmq_node_" + GetProcExe() + ".log"); |
| | | return true; |
| | | }; |
| | | static bool init_log = InitLog(); |
| | |
| | | msg = LastErrorStore().msg_; |
| | | } |
| | | |
| | | int NodeTimeoutSec() { return 60; } |
| | | int NodeTimeoutSec() { return 60; } |
| | | |
| | | std::string BHLogDir() { return "/opt/vasystem/valog/"; } |
| | |
| | | // node mq is avail with in timeout; after that may get killed. |
| | | int NodeTimeoutSec(); |
| | | |
| | | std::string BHLogDir(); |
| | | |
| | | #endif // end of include guard: DEFS_KP8LKGD0 |