diff --git a/src/maat_bool_plugin.c b/src/maat_bool_plugin.c index 7064fe1..328ba31 100644 --- a/src/maat_bool_plugin.c +++ b/src/maat_bool_plugin.c @@ -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); diff --git a/src/maat_compile.c b/src/maat_compile.c index d92a359..8625ed0 100644 --- a/src/maat_compile.c +++ b/src/maat_compile.c @@ -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; } diff --git a/src/maat_fqdn_plugin.c b/src/maat_fqdn_plugin.c index f5e6bc5..595e9f6 100644 --- a/src/maat_fqdn_plugin.c +++ b/src/maat_fqdn_plugin.c @@ -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); diff --git a/src/maat_ip_plugin.c b/src/maat_ip_plugin.c index 48eea75..bc44592 100644 --- a/src/maat_ip_plugin.c +++ b/src/maat_ip_plugin.c @@ -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); diff --git a/src/maat_ipport_plugin.c b/src/maat_ipport_plugin.c index 4ab324e..d6fd44c 100644 --- a/src/maat_ipport_plugin.c +++ b/src/maat_ipport_plugin.c @@ -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); diff --git a/src/maat_plugin.c b/src/maat_plugin.c index eac14d6..95e61dd 100644 --- a/src/maat_plugin.c +++ b/src/maat_plugin.c @@ -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; } diff --git a/src/maat_rule.c b/src/maat_rule.c index 50678b1..1ebbad7 100644 --- a/src/maat_rule.c +++ b/src/maat_rule.c @@ -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); } } diff --git a/test/maat_framework_gtest.cpp b/test/maat_framework_gtest.cpp index effc07e..13cae8c 100644 --- a/test/maat_framework_gtest.cpp +++ b/test/maat_framework_gtest.cpp @@ -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;