|
@@ -43,7 +43,7 @@ public:
|
|
|
|
|
|
static StartupLogManager& getInstance();
|
|
|
//StartupLogManager::getInstance().addLog(entityName, entity_id);
|
|
|
- void addLog(const std::string& module_entity, int idx); // 新增 addLog 方法
|
|
|
+ void addLog(const std::string& module_entity, int idx); // 鏂板� addLog 鏂规硶
|
|
|
bool checkLogExist(int idx);
|
|
|
StartupLog& getLog(int idx);
|
|
|
/*
|
|
@@ -193,13 +193,13 @@ StartupLogManager::~StartupLogManager() {}
|
|
|
void StartupLogManager::addLog(const std::string& module_entity, int idx) {
|
|
|
recordStartTime();
|
|
|
if (logs_.find(idx) == logs_.end()) {
|
|
|
- logs_[idx] = StartupLog(module_entity, idx); // 直接拷贝 log 对象
|
|
|
- } // 如果已存在,则忽略
|
|
|
+ logs_[idx] = StartupLog(module_entity, idx); // 鐩存帴鎷疯礉 log 瀵硅薄
|
|
|
+ } // 濡傛灉宸插瓨鍦�紝鍒欏拷鐣�
|
|
|
}
|
|
|
|
|
|
StartupLog& StartupLogManager::getLog(int idx) {
|
|
|
if (logs_.find(idx) == logs_.end()) {
|
|
|
- logs_[idx] = StartupLog("", idx); // 仍然保留隐式创建的逻辑,方便使用
|
|
|
+ logs_[idx] = StartupLog("", idx); // 浠嶇劧淇濈暀闅愬紡鍒涘缓鐨勯€昏緫锛屾柟渚夸娇鐢�
|
|
|
}
|
|
|
return logs_[idx];
|
|
|
}
|