From b18cc3928cbf20eee0859ab59fdd788074850520 Mon Sep 17 00:00:00 2001 From: luwenpeng Date: Mon, 9 Mar 2020 16:56:39 +0800 Subject: [PATCH] =?UTF-8?q?TSG-935=20=E5=BD=93=20disable=20kafka=20log=20?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E4=B8=8D=E5=86=8D=E8=A7=A3=E6=9E=90=20broker?= =?UTF-8?q?=5Flist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform/src/ssl_fetch_cert.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/src/ssl_fetch_cert.cpp b/platform/src/ssl_fetch_cert.cpp index 9dadcf6..dc9ddd7 100644 --- a/platform/src/ssl_fetch_cert.cpp +++ b/platform/src/ssl_fetch_cert.cpp @@ -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;