[PATCH]add debug log for config update
This commit is contained in:
@@ -425,6 +425,10 @@ int bool_plugin_runtime_update(void *bool_plugin_runtime, void *bool_plugin_sche
|
||||
bool_plugin_rt->update_err_cnt++;
|
||||
return -1;
|
||||
}
|
||||
|
||||
log_debug(bool_plugin_rt->logger, MODULE_BOOL_PLUGIN,
|
||||
"bool_plugin table:<%s> update one line, key:%s, key_len:%zu, is_valid:%d",
|
||||
table_name, key, key_len, is_valid);
|
||||
} else {
|
||||
//ex_schema not set
|
||||
ex_data_runtime_cache_row_put(bool_plugin_rt->ex_data_rt, line);
|
||||
|
||||
@@ -711,7 +711,7 @@ group2compile_item_new(const char *line, struct group2compile_schema *g2c_schema
|
||||
&column_len);
|
||||
if (ret < 0) {
|
||||
log_error(logger, MODULE_COMPILE,
|
||||
"[%s:%d] g2c table:<%s>has no virtual_table_name in line:%s",
|
||||
"[%s:%d] g2c table:<%s> has no virtual_table_name in line:%s",
|
||||
__FUNCTION__, __LINE__, table_name, line);
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -439,6 +439,10 @@ int fqdn_plugin_runtime_update(void *fqdn_plugin_runtime, void *fqdn_plugin_sche
|
||||
fqdn_plugin_rt->update_err_cnt++;
|
||||
return -1;
|
||||
}
|
||||
|
||||
log_debug(fqdn_plugin_rt->logger, MODULE_FQDN_PLUGIN,
|
||||
"fqdn_plugin table:<%s> update one line, key:%s, key_len:%zu, is_valid:%d",
|
||||
table_name, key, key_len, is_valid);
|
||||
} else {
|
||||
//ex_schema not set
|
||||
ex_data_runtime_cache_row_put(fqdn_plugin_rt->ex_data_rt, line);
|
||||
|
||||
@@ -441,6 +441,10 @@ int ip_plugin_runtime_update(void *ip_plugin_runtime, void *ip_plugin_schema,
|
||||
ip_plugin_rt->update_err_cnt++;
|
||||
return -1;
|
||||
}
|
||||
|
||||
log_debug(ip_plugin_rt->logger, MODULE_IP_PLUGIN,
|
||||
"ip_plugin table:<%s> update one line, key:%s, key_len:%zu, is_valid:%d",
|
||||
table_name, key, key_len, is_valid);
|
||||
} else {
|
||||
//ex_schema not set
|
||||
ex_data_runtime_cache_row_put(ip_plugin_rt->ex_data_rt, line);
|
||||
|
||||
@@ -437,6 +437,10 @@ int ipport_plugin_runtime_update(void *ipport_plugin_runtime, void *ipport_plugi
|
||||
ipport_plugin_rt->update_err_cnt++;
|
||||
return -1;
|
||||
}
|
||||
|
||||
log_debug(ipport_plugin_rt->logger, MODULE_IPPORT_PLUGIN,
|
||||
"ipport_plugin table:<%s> update one line, key:%s, key_len:%zu, is_valid:%d",
|
||||
table_name, key, key_len, is_valid);
|
||||
} else {
|
||||
//ex_schema not set
|
||||
ex_data_runtime_cache_row_put(ipport_plugin_rt->ex_data_rt, line);
|
||||
|
||||
@@ -579,6 +579,10 @@ int plugin_runtime_update(void *plugin_runtime, void *plugin_schema,
|
||||
return -1;
|
||||
}
|
||||
|
||||
log_debug(plugin_rt->logger, MODULE_PLUGIN,
|
||||
"plugin table:<%s> update one line, key:%s, key_len:%zu, is_valid:%d",
|
||||
table_name, key, key_len, is_valid);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -178,9 +178,11 @@ static long long maat_runtime_rule_num(struct maat_runtime *maat_rt)
|
||||
for (size_t i = 0; i < maat_rt->max_table_num; i++) {
|
||||
long long rule_cnt = table_manager_runtime_rule_count(maat_rt->ref_tbl_mgr, i);
|
||||
total += rule_cnt;
|
||||
|
||||
if (rule_cnt != 0) {
|
||||
log_info(maat_rt->logger, MODULE_MAAT_RULE,
|
||||
"table:%d rule count:%lld", i, rule_cnt);
|
||||
"table:<%s> rule count:%lld",
|
||||
table_manager_get_table_name(maat_rt->ref_tbl_mgr, i), rule_cnt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6639,6 +6639,7 @@ TEST_F(MaatCmdTest, PluginEXData) {
|
||||
EXPECT_EQ(0, strcmp(uinfo1->name, "liuqiangdong"));
|
||||
EXPECT_EQ(uinfo1->id, 2);
|
||||
|
||||
//DEL
|
||||
memset(&line_rule, 0, sizeof(line_rule));
|
||||
line_rule.rule_id = rule_id[1];
|
||||
line_rule.table_name = table_name;
|
||||
@@ -6647,7 +6648,7 @@ TEST_F(MaatCmdTest, PluginEXData) {
|
||||
|
||||
ret = maat_cmd_set_line(maat_inst, &line_rule);
|
||||
EXPECT_GT(ret, 0);
|
||||
|
||||
|
||||
sleep(WAIT_FOR_EFFECTIVE_S); //gc_timeout_s == 3 which configured in table_info
|
||||
|
||||
struct user_info *uinfo2 = NULL;
|
||||
|
||||
Reference in New Issue
Block a user