RT
日志的初始化模块,和IBDevice的初始化的顺序是不是反了,即IBDevice初始化时,日志的句柄是不是还没有初始化完成?
`
void initCommonComponents(const ApplicationBase::Config &cfg, const String &serverName, flat::NodeId nodeId) {
initLogging(cfg.log(), serverName);
XLOGF(INFO, "{}", VersionInfo::full());
XLOGF(INFO, "Init waiter singleton {}", fmt::ptr(&net::Waiter::instance()));
auto monitorResult =
monitor::Monitor::start(cfg.monitor(), nodeId == 0 ? "" : fmt::format("Node_{}", nodeId.toUnderType()));
XLOGF_IF(FATAL, !monitorResult, "Start monitor failed: {}", monitorResult.error());
}
`
此外,这个函数中,头两条日志,也时有时无。是否跟folly log是lazy初始化有关?
RT
日志的初始化模块,和IBDevice的初始化的顺序是不是反了,即IBDevice初始化时,日志的句柄是不是还没有初始化完成?
`
void initCommonComponents(const ApplicationBase::Config &cfg, const String &serverName, flat::NodeId nodeId) {
initLogging(cfg.log(), serverName);
XLOGF(INFO, "{}", VersionInfo::full());
XLOGF(INFO, "Init waiter singleton {}", fmt::ptr(&net::Waiter::instance()));
auto monitorResult =
monitor::Monitor::start(cfg.monitor(), nodeId == 0 ? "" : fmt::format("Node_{}", nodeId.toUnderType()));
XLOGF_IF(FATAL, !monitorResult, "Start monitor failed: {}", monitorResult.error());
}
`
此外,这个函数中,头两条日志,也时有时无。是否跟folly log是lazy初始化有关?