From a2c86f5ca83773f2d7910c15cbd5336fe9271307 Mon Sep 17 00:00:00 2001 From: buzhenwang Date: Tue, 6 Dec 2022 21:16:50 +0800 Subject: [PATCH] del err log for HILOG_OHCORE_VERSION Signed-off-by: buzhenwang --- frameworks/libhilog/BUILD.gn | 4 ++++ frameworks/libhilog/base/hilog_base.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/frameworks/libhilog/BUILD.gn b/frameworks/libhilog/BUILD.gn index fe1a662..94d831c 100644 --- a/frameworks/libhilog/BUILD.gn +++ b/frameworks/libhilog/BUILD.gn @@ -133,6 +133,10 @@ ohos_source_set("libhilog_base_source") { "__RECV_MSG_WITH_UCRED_", "HILOG_PROHIBIT_ALLOCATION", ] + if (hilog_native_feature_ohcore) { + defines += [ "HILOG_OHCORE_VERSION" ] + } + public_configs = [ ":libhilog_base_config" ] configs = [ ":libhilog_base_config" ] diff --git a/frameworks/libhilog/base/hilog_base.cpp b/frameworks/libhilog/base/hilog_base.cpp index be974f1..ecef5fa 100644 --- a/frameworks/libhilog/base/hilog_base.cpp +++ b/frameworks/libhilog/base/hilog_base.cpp @@ -92,7 +92,9 @@ static int CheckConnection(SocketHandler& socketHandler) auto result = TEMP_FAILURE_RETRY(connect(socketHandler.socketFd.load(), reinterpret_cast(&SOCKET_ADDR), sizeof(SOCKET_ADDR))); if (result < 0) { +#ifndef HILOG_OHCORE_VERSION std::cerr << "Can't connect to hilog server. Errno: " << errno << "\n"; +#endif return result; } socketHandler.isConnected.store(true); -- Gitee