feat(liblogc): 统一集中式日志客户端库 + 全量迁移
新增: - liblogc/: C++ 统一日志库 (libus_logc.so),支持 set_endpoint/set_service_name/set_level - pymsg/pymsg/logc.py: Python 统一日志模块,基于 AsyncRpcQueue C++ 迁移 (删除 6 份本地 LogC.hpp 副本): - ca, gateway: <us/LogC.hpp> + set_service_name - captcha2, confs2, smtp3: using qing::LogC + set_service_name - core: ConfsLogC → qing::LogC (ConfsTask.cpp) - 所有 Makefile 添加 -lus_logc Python 迁移 (6 个 log_client.py → 4 行薄包装): - smtp, redirect80, confs, captcha, dnfs, static - 全部委托到 pymsg.logc.LogClient Go (waf): 保持现状,自成体系
This commit is contained in:
1 parent
01ae877673
commit
aa3741b861
32 files changed
+608
-2129
No files matched your search
+3
-2
@@ -59,12 +59,12 @@
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "LogC.hpp"
|
||||
#include <us/LogC.hpp>
|
||||
|
||||
namespace json = boost::json;
|
||||
namespace po = boost::program_options;
|
||||
|
||||
using namespace smtp3;
|
||||
using qing::LogC;
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
// 辅助: 安全的 stoi
|
||||
@@ -716,6 +716,7 @@ static SendLimiter g_limiter;
|
||||
static std::unordered_map<std::string, double> g_cooldown;
|
||||
static std::mutex g_cooldown_mtx;
|
||||
static auto& g_log = LogC::instance();
|
||||
static const auto _log_init = (LogC::instance().set_service_name("smtp3-log"), true);
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
// 8. main() — RpcServer 启动
|
||||
|
||||
Reference in new issue
Block a user