log optimize
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user