fix event fun
This commit is contained in:
@@ -50,19 +50,16 @@ extern std::string subdir;
|
||||
//日志主题
|
||||
extern std::string G_LOG_TOPIC;
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
/* log4.cpp 顶部 */
|
||||
#if __cplusplus >= 201103L
|
||||
thread_local int g_log_code_tls = 0;
|
||||
#else
|
||||
__thread int g_log_code_tls = 0;
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////辅助函数
|
||||
/*std::string get_front_type_from_subdir() {
|
||||
if (subdir == "cfg_3s_data")
|
||||
return "realTime";
|
||||
else if (subdir == "cfg_soe_comtrade")
|
||||
return "comtrade";
|
||||
else if (subdir == "cfg_recallhis_data")
|
||||
return "recall";
|
||||
else if (subdir == "cfg_stat_data")
|
||||
return "stat";
|
||||
else
|
||||
return "unknown";
|
||||
}*/
|
||||
|
||||
|
||||
// 递归创建目录
|
||||
bool create_directory_recursive(const std::string& path) {
|
||||
@@ -129,10 +126,6 @@ bool DebugSwitch::match(const std::string& logger_name, int level, int logtype)
|
||||
std::map<std::string, TypedLogger> logger_map;
|
||||
DebugSwitch g_debug_switch;
|
||||
|
||||
// ★新增:定义 TLS 变量,默认 0
|
||||
|
||||
thread_local int g_log_code_tls = 0;
|
||||
|
||||
class SendAppender : public Appender {
|
||||
protected:
|
||||
void append(const spi::InternalLoggingEvent& event) {
|
||||
|
||||
Reference in New Issue
Block a user