log optimize

This commit is contained in:
lnk
2025-05-30 15:40:20 +08:00
parent 8d3ec192e8
commit a33418113a
6 changed files with 106 additions and 52 deletions

View File

@@ -36,6 +36,8 @@
#include <pthread.h> // 用于互斥锁(在 C++98 中没有 std::mutex
#include <utility> // for std::pair
#include "../log4cplus/log4.h"//lnk添加log4
using namespace std;
extern std::string G_ROCKETMQ_PRODUCER;//rocketmq producer
@@ -553,6 +555,7 @@ void rocketmq_producer_send(const char* strbody, const char* topic)
catch (const std::exception& e) {
std::cerr << "Failed to send message: " << e.what() << std::endl;
// 处理发送失败的情况,例如记录日志或重试
DIY_ERRORLOG("process","【ERROR】前置的%s%d号进程 mq发送失败,请检查mq配置", get_front_msg_from_subdir(), g_front_seg_index);
}
}
#endif