[FEATURE]maat support dynamic reload log_level

This commit is contained in:
liuwentan
2023-12-05 16:31:18 +08:00
parent f48afd54f6
commit 59ee9364c9
9 changed files with 98 additions and 122 deletions

View File

@@ -6999,7 +6999,7 @@ protected:
struct maat_options *opts = maat_options_new();
maat_options_set_redis(opts, redis_ip, redis_port, redis_db);
maat_options_set_stat_file(opts, "./stat.log");
maat_options_set_logger(opts, "./maat_framework_gtest.log", LOG_LEVEL_INFO);
maat_options_set_logger(opts, "./maat_framework_gtest.log", LOG_LEVEL_FATAL);
maat_options_set_hit_path_enabled(opts);
maat_options_set_hit_group_enabled(opts);
@@ -7038,6 +7038,7 @@ TEST_F(MaatCmdTest, SetIP) {
const char *g2c_table_name = "GROUP2COMPILE_DEFAULT";
struct maat *maat_inst = MaatCmdTest::_shared_maat_inst;
struct maat_state *state = maat_state_new(maat_inst, thread_id);
maat_reload_log_level(maat_inst, LOG_LEVEL_INFO);
/* compile table add line */
long long compile_id = maat_cmd_incrby(maat_inst, "TEST_SEQ", 1);

View File

@@ -2267,34 +2267,6 @@
}
]
},
{
"compile_id": 183,
"service": 1,
"action": 1,
"do_blacklist": 1,
"do_log": 1,
"user_region": "StringScan.RegexWithNotContains",
"is_valid": "yes",
"groups": [
{
"virtual_table": "CORNER_CASE_TABLE",
"group_name": "183_expr_group",
"group_id": 168,
"regions": [
{
"table_name": "CORNER_CASE_TABLE",
"table_type": "expr",
"table_content": {
"keywords": "^(?=.*/rain/a/TWF2021042600418000)(?!new.qq.com).*",
"expr_type": "regex",
"match_method": "sub",
"format": "uncase plain"
}
}
]
}
]
},
{
"compile_id": 184,
"user_region": "APP_ID=6006740;Liumengyan-Bugreport-20210515",