summaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authortongzongzhen <[email protected]>2024-05-20 14:20:25 +0800
committertongzongzhen <[email protected]>2024-05-20 14:20:25 +0800
commitbe0f519e9b6f788ebe5a05e648ded1b7243aeef0 (patch)
treea61a31856dc3ee90e886f997006618274f621cd8 /src/config.c
parentfc48d6d4b0cc81e126801ad0076fc9403bf7d205 (diff)
load debug option from static config.Because dynamic files cannot be modified directly through vim. Static files can be modified using hotfix or vim.
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/config.c b/src/config.c
index 216d726..df50762 100644
--- a/src/config.c
+++ b/src/config.c
@@ -121,6 +121,10 @@ void config_load()
MESA_load_profile_string_def(config_path, "maat", "maat_redis_port_range", g_conf->redis_port_range,
sizeof(g_conf->redis_server), "6379");
MESA_load_profile_int_def(config_path, "maat", "maat_redis_db_index", &(g_conf->redis_db_idx), 0);
+
+ MESA_load_profile_uint_def(config_path, "debug", "send_ctrlbuf", &g_conf->send_ctrlbuf, 0);
+ MESA_load_profile_uint_def(config_path, "debug", "kafka_dump_to_log", &(g_conf->kafka_dump_to_log), 0);
+ MESA_load_profile_uint_def(config_path, "debug", "arp_pkt_has_ip_test", &(g_conf->arp_pkt_has_ip_test), 0);
}
void dynamic_config_load()
@@ -185,15 +189,6 @@ void dynamic_config_load()
desc_i->measurement_type = DP_TRACE_MEASUREMENT_TYPE_TRACE;
}
-
- MESA_load_profile_uint_def(g_conf->dy_config_path, "debug", "send_ctrlbuf", &g_conf->send_ctrlbuf, 0);
- MESA_load_profile_uint_def(g_conf->dy_config_path, "debug", "kafka_dump_to_log", &(g_conf->kafka_dump_to_log), 0);
- MESA_load_profile_uint_def(g_conf->dy_config_path, "debug", "arp_pkt_has_ip_test", &(g_conf->arp_pkt_has_ip_test),
- 0);
-
- dzlog_info("send_ctrlbuf:%u", g_conf->send_ctrlbuf);
- dzlog_info("kafka_dump_to_log:%u", g_conf->kafka_dump_to_log);
- dzlog_info("arp_pkt_has_ip_test:%u", g_conf->arp_pkt_has_ip_test);
dzlog_info("Loading data path trace configuration file is completed.");
}