TSG-935 当 disable kafka log 时,不再解析 broker_list
This commit is contained in:
@@ -38,11 +38,14 @@ int ssl_mid_cert_kafka_logger_create(const char *profile, const char *section)
|
||||
MESA_load_profile_int_def(profile, section, "mc_cache_enable", &enable, 0);
|
||||
MESA_load_profile_string_def(profile, section, "mc_cache_eth", nic_name, sizeof(nic_name), "eth0");
|
||||
MESA_load_profile_string_def(profile, section, "mc_cache_topic", topic_name, sizeof(topic_name), "PXY-EXCH-INTERMEDIA-CERT");
|
||||
if (!enable) // is disable,skip broker list
|
||||
goto skip;
|
||||
if (MESA_load_profile_string_def(profile, section, "mc_cache_broker_list", broker_list, sizeof(broker_list), NULL) < 0)
|
||||
{
|
||||
TFE_LOG_ERROR(g_default_logger, "%s, Fail to get mc_cache_broker_list in profile %s section %s.", errstr, profile, section);
|
||||
return -1;
|
||||
}
|
||||
skip:
|
||||
g_kafka_logger = tfe_kafka_logger_create(enable, nic_name, broker_list, topic_name, g_default_logger);
|
||||
if (g_kafka_logger)
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user