From f19e40376f73064877e54936ae6be8727100ba7b Mon Sep 17 00:00:00 2001 From: li-yaoyao777 Date: Fri, 11 Nov 2022 14:18:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E6=94=B9=E6=97=A5=E5=BF=97=E7=BA=A7?= =?UTF-8?q?=E5=88=AB=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: li-yaoyao777 --- .../native/sensor/src/sensor_agent_proxy.cpp | 6 +++--- interfaces/plugin/src/sensor_js.cpp | 2 +- interfaces/plugin/src/sensor_napi_utils.cpp | 4 ++-- .../adapter/src/compatible_connection.cpp | 4 ++-- .../adapter/src/hdi_connection.cpp | 4 ++-- .../adapter/src/sensor_event_callback.cpp | 2 +- .../interface/src/sensor_hdi_connection.cpp | 17 ++++++++--------- services/sensor/src/client_info.cpp | 10 +++++----- services/sensor/src/sensor_dump.cpp | 2 +- services/sensor/src/sensor_manager.cpp | 6 +++--- services/sensor/src/sensor_service.cpp | 10 +++++----- services/sensor/src/sensor_service_stub.cpp | 2 +- services/sensor/src/sensor_suspend_policy.cpp | 6 +++--- utils/src/sensor_basic_data_channel.cpp | 12 ++++++------ 14 files changed, 43 insertions(+), 44 deletions(-) diff --git a/frameworks/native/sensor/src/sensor_agent_proxy.cpp b/frameworks/native/sensor/src/sensor_agent_proxy.cpp index 23cfa067..fe75d57c 100644 --- a/frameworks/native/sensor/src/sensor_agent_proxy.cpp +++ b/frameworks/native/sensor/src/sensor_agent_proxy.cpp @@ -74,7 +74,7 @@ void SensorAgentProxy::HandleSensorData(SensorEvent *events, int32_t num, void * for (int32_t i = 0; i < num; ++i) { eventStream = events[i]; if (g_subscribeMap.find(eventStream.sensorTypeId) == g_subscribeMap.end()) { - SEN_HILOGE("sensorTypeId not in g_subscribeMap"); + SEN_HILOGW("sensorTypeId not in g_subscribeMap"); return; } CHKPV(g_subscribeMap[eventStream.sensorTypeId]); @@ -204,7 +204,7 @@ int32_t SensorAgentProxy::SetBatch(int32_t sensorId, const SensorUser *user, int int32_t SensorAgentProxy::SubscribeSensor(int32_t sensorId, const SensorUser *user) const { - SEN_HILOGI("in, sensorId:%{public}d", sensorId); + CALL_LOG_ENTER; CHKPR(user, OHOS::Sensors::ERROR); CHKPR(user->callback, OHOS::Sensors::ERROR); if (!SenClient.IsValid(sensorId)) { @@ -223,7 +223,7 @@ int32_t SensorAgentProxy::SubscribeSensor(int32_t sensorId, const SensorUser *us int32_t SensorAgentProxy::UnsubscribeSensor(int32_t sensorId, const SensorUser *user) const { - SEN_HILOGI("in, sensorId: %{public}d", sensorId); + CALL_LOG_ENTER; CHKPR(user, OHOS::Sensors::ERROR); CHKPR(user->callback, OHOS::Sensors::ERROR); if (!SenClient.IsValid(sensorId)) { diff --git a/interfaces/plugin/src/sensor_js.cpp b/interfaces/plugin/src/sensor_js.cpp index 5dd0f15a..26d0b428 100644 --- a/interfaces/plugin/src/sensor_js.cpp +++ b/interfaces/plugin/src/sensor_js.cpp @@ -412,7 +412,7 @@ static napi_value Off(napi_env env, napi_callback_info info) "There are other client subscribe as well, not need unsubscribe"); } if (CheckSystemSubscribe(sensorTypeId)) { - SEN_HILOGW("There are other client subscribe system js api as well, not need unsubscribe"); + SEN_HILOGI("There are other client subscribe system js api as well, not need unsubscribe"); return nullptr; } int32_t ret = UnsubscribeSensor(sensorTypeId); diff --git a/interfaces/plugin/src/sensor_napi_utils.cpp b/interfaces/plugin/src/sensor_napi_utils.cpp index 86f74912..8a831dd2 100644 --- a/interfaces/plugin/src/sensor_napi_utils.cpp +++ b/interfaces/plugin/src/sensor_napi_utils.cpp @@ -72,7 +72,7 @@ napi_value GetNamedProperty(const napi_env &env, const napi_value &object, strin bool status = false; CHKNRP(env, napi_has_named_property(env, object, name.c_str(), &status), "napi_has_named_property"); if (!status) { - SEN_HILOGW("%{public}s not exists on the object", name.c_str()); + SEN_HILOGI("%{public}s not exists on the object", name.c_str()); return nullptr; } napi_value value = nullptr; @@ -302,7 +302,7 @@ bool ConvertToFailData(const napi_env &env, sptr asyncCallbac int32_t code = asyncCallbackInfo->error.code; auto msg = GetNapiError(code); if (!msg) { - SEN_HILOGE("errCode: %{public}d is invalid", code); + SEN_HILOGE("errCode:%{public}d is invalid", code); return false; } result[0] = CreateBusinessError(env, code, msg.value()); diff --git a/services/sensor/hdi_connection/adapter/src/compatible_connection.cpp b/services/sensor/hdi_connection/adapter/src/compatible_connection.cpp index 7218e86f..20a2ba38 100644 --- a/services/sensor/hdi_connection/adapter/src/compatible_connection.cpp +++ b/services/sensor/hdi_connection/adapter/src/compatible_connection.cpp @@ -103,7 +103,7 @@ int32_t CompatibleConnection::SetMode(int32_t sensorId, int32_t mode) { int32_t ret = hdiServiceImpl_.SetMode(sensorId, mode); if (ret != 0) { - SEN_HILOGI("set mode failed, sensorId:%{public}d", sensorId); + SEN_HILOGE("set mode failed, sensorId:%{public}d", sensorId); return ret; } return ERR_OK; @@ -118,7 +118,7 @@ int32_t CompatibleConnection::SetOption(int32_t sensorId, int32_t option) { int32_t ret = hdiServiceImpl_.SetOption(sensorId, option); if (ret != 0) { - SEN_HILOGI("set option failed, sensorId:%{public}d", sensorId); + SEN_HILOGE("set option failed, sensorId:%{public}d", sensorId); return ret; } return ERR_OK; diff --git a/services/sensor/hdi_connection/adapter/src/hdi_connection.cpp b/services/sensor/hdi_connection/adapter/src/hdi_connection.cpp index 524d0e41..5b5e6068 100644 --- a/services/sensor/hdi_connection/adapter/src/hdi_connection.cpp +++ b/services/sensor/hdi_connection/adapter/src/hdi_connection.cpp @@ -234,7 +234,7 @@ void HdiConnection::SetSensorBasicInfoState(int32_t sensorId, bool state) std::lock_guard sensorInfoLock(sensorBasicInfoMutex_); auto it = sensorBasicInfoMap_.find(sensorId); if (it == sensorBasicInfoMap_.end()) { - SEN_HILOGW("should set batch first"); + SEN_HILOGI("should set batch first"); return; } sensorBasicInfoMap_[sensorId].SetSensorState(state); @@ -300,7 +300,7 @@ void HdiConnection::Reconnect() int32_t sensorTypeId = sensorInfo.first; SensorBasicInfo info = sensorInfo.second; if (info.GetSensorState() != true) { - SEN_HILOGE("sensorTypeId: %{public}d don't need enable sensor", sensorTypeId); + SEN_HILOGE("sensorTypeId:%{public}d don't need enable sensor", sensorTypeId); continue; } ret = sensorInterface_->SetBatch(sensorTypeId, info.GetSamplingPeriodNs(), info.GetMaxReportDelayNs()); diff --git a/services/sensor/hdi_connection/adapter/src/sensor_event_callback.cpp b/services/sensor/hdi_connection/adapter/src/sensor_event_callback.cpp index 75388312..c317f3a9 100644 --- a/services/sensor/hdi_connection/adapter/src/sensor_event_callback.cpp +++ b/services/sensor/hdi_connection/adapter/src/sensor_event_callback.cpp @@ -33,7 +33,7 @@ int32_t SensorEventCallback::OnDataEvent(const HdfSensorEvents& event) CHKPR(reportDataCallback_, ERR_NO_INIT); int32_t dataSize = static_cast(event.data.size()); if (dataSize == 0) { - SEN_HILOGI("data is empty"); + SEN_HILOGE("data is empty"); return ERR_INVALID_VALUE; } SensorData sensorData = { diff --git a/services/sensor/hdi_connection/interface/src/sensor_hdi_connection.cpp b/services/sensor/hdi_connection/interface/src/sensor_hdi_connection.cpp index 7f1ca5e6..761e364a 100644 --- a/services/sensor/hdi_connection/interface/src/sensor_hdi_connection.cpp +++ b/services/sensor/hdi_connection/interface/src/sensor_hdi_connection.cpp @@ -29,7 +29,6 @@ constexpr HiLogLabel LABEL = { LOG_CORE, SENSOR_LOG_DOMAIN, "SensorHdiConnection int32_t SensorHdiConnection::ConnectHdi() { iSensorHdiConnection_ = std::make_unique(); - CHKPR(iSensorHdiConnection_, ERROR); int32_t ret = ConnectHdiService(); if (ret != ERR_OK) { SEN_HILOGE("connect hdi service failed, try to connect compatible connection"); @@ -69,7 +68,7 @@ int32_t SensorHdiConnection::EnableSensor(int32_t sensorId) int32_t ret = iSensorHdiConnection_->EnableSensor(sensorId); FinishTrace(HITRACE_TAG_SENSORS); if (ret != 0) { - SEN_HILOGI("enable sensor failed, sensorId:%{public}d", sensorId); + SEN_HILOGE("enable sensor failed, sensorId:%{public}d", sensorId); return ENABLE_SENSOR_ERR; } return ret; @@ -81,7 +80,7 @@ int32_t SensorHdiConnection::DisableSensor(int32_t sensorId) int32_t ret = iSensorHdiConnection_->DisableSensor(sensorId); FinishTrace(HITRACE_TAG_SENSORS); if (ret != 0) { - SEN_HILOGI("disable sensor failed, sensorId:%{public}d", sensorId); + SEN_HILOGE("disable sensor failed, sensorId:%{public}d", sensorId); return DISABLE_SENSOR_ERR; } return ret; @@ -93,7 +92,7 @@ int32_t SensorHdiConnection::SetBatch(int32_t sensorId, int64_t samplingInterval int32_t ret = iSensorHdiConnection_->SetBatch(sensorId, samplingInterval, reportInterval); FinishTrace(HITRACE_TAG_SENSORS); if (ret != 0) { - SEN_HILOGI("set batch failed, sensorId:%{public}d", sensorId); + SEN_HILOGE("set batch failed, sensorId:%{public}d", sensorId); return SET_SENSOR_CONFIG_ERR; } return ret; @@ -105,7 +104,7 @@ int32_t SensorHdiConnection::SetMode(int32_t sensorId, int32_t mode) int32_t ret = iSensorHdiConnection_->SetMode(sensorId, mode); FinishTrace(HITRACE_TAG_SENSORS); if (ret != 0) { - SEN_HILOGI("set mode failed, sensorId:%{public}d", sensorId); + SEN_HILOGE("set mode failed, sensorId:%{public}d", sensorId); return SET_SENSOR_MODE_ERR; } return ret; @@ -117,7 +116,7 @@ int32_t SensorHdiConnection::SetOption(int32_t sensorId, int32_t option) int32_t ret = iSensorHdiConnection_->SetOption(sensorId, option); FinishTrace(HITRACE_TAG_SENSORS); if (ret != 0) { - SEN_HILOGI("set option failed, sensorId:%{public}d", sensorId); + SEN_HILOGE("set option failed, sensorId:%{public}d", sensorId); return SET_SENSOR_OPTION_ERR; } return ret; @@ -129,7 +128,7 @@ int32_t SensorHdiConnection::RunCommand(int32_t sensorId, int32_t cmd, int32_t p int32_t ret = iSensorHdiConnection_->RunCommand(sensorId, cmd, params); FinishTrace(HITRACE_TAG_SENSORS); if (ret != 0) { - SEN_HILOGI("run command failed, sensorId:%{public}d", sensorId); + SEN_HILOGE("run command failed, sensorId:%{public}d", sensorId); return RUN_COMMAND_ERR; } return ret; @@ -141,7 +140,7 @@ int32_t SensorHdiConnection::RegisteDataReport(ReportDataCb cb, sptrRegisteDataReport(cb, reportDataCallback); FinishTrace(HITRACE_TAG_SENSORS); if (ret != 0) { - SEN_HILOGI("registe dataReport failed"); + SEN_HILOGE("registe dataReport failed"); return REGIST_CALLBACK_ERR; } return ret; @@ -151,7 +150,7 @@ int32_t SensorHdiConnection::DestroyHdiConnection() { int32_t ret = iSensorHdiConnection_->DestroyHdiConnection(); if (ret != 0) { - SEN_HILOGI("destroy hdi connection failed"); + SEN_HILOGE("destroy hdi connection failed"); return DEVICE_ERR; } return ret; diff --git a/services/sensor/src/client_info.cpp b/services/sensor/src/client_info.cpp index f0374d7d..0a5350d8 100644 --- a/services/sensor/src/client_info.cpp +++ b/services/sensor/src/client_info.cpp @@ -148,7 +148,7 @@ void ClientInfo::DestroyAppThreadInfo(int32_t pid) std::lock_guard uidLock(uidMutex_); auto appThreadInfoItr = appThreadInfoMap_.find(pid); if (appThreadInfoItr == appThreadInfoMap_.end()) { - SEN_HILOGD("uid not exist, no need to destroy it"); + SEN_HILOGE("uid not exist, no need to destroy it"); return; } appThreadInfoMap_.erase(appThreadInfoItr); @@ -246,7 +246,7 @@ void ClientInfo::RemoveSubscriber(uint32_t sensorId, uint32_t pid) std::lock_guard clientLock(clientMutex_); auto it = clientMap_.find(sensorId); if (it == clientMap_.end()) { - SEN_HILOGW("sensorId not exist"); + SEN_HILOGE("sensorId not exist"); return; } auto pidIt = it->second.find(pid); @@ -288,7 +288,7 @@ void ClientInfo::ClearSensorInfo(uint32_t sensorId) std::lock_guard clientLock(clientMutex_); auto it = clientMap_.find(sensorId); if (it == clientMap_.end()) { - SEN_HILOGD("sensorId not exist, no need to clear it"); + SEN_HILOGE("sensorId not exist, no need to clear it"); return; } clientMap_.erase(it); @@ -304,12 +304,12 @@ void ClientInfo::ClearCurPidSensorInfo(uint32_t sensorId, int32_t pid) std::lock_guard clientLock(clientMutex_); auto it = clientMap_.find(sensorId); if (it == clientMap_.end()) { - SEN_HILOGD("sensorId not exist, no need to clear it"); + SEN_HILOGE("sensorId not exist, no need to clear it"); return; } auto pidIt = it->second.find(pid); if (pidIt == it->second.end()) { - SEN_HILOGD("pid not exist, no need to clear it"); + SEN_HILOGE("pid not exist, no need to clear it"); return; } pidIt = it->second.erase(pidIt); diff --git a/services/sensor/src/sensor_dump.cpp b/services/sensor/src/sensor_dump.cpp index ced0de4d..29040d77 100644 --- a/services/sensor/src/sensor_dump.cpp +++ b/services/sensor/src/sensor_dump.cpp @@ -304,7 +304,7 @@ int32_t SensorDump::DataSizeBySensorId(uint32_t sensorId) case ACCELEROMETER_UNCALIBRATED: return UNCALIBRATED_DIMENSION; default: - SEN_HILOGW("sensorId: %{public}u,size: %{public}d", sensorId, COMMON_DIMENSION); + SEN_HILOGI("sensorId:%{public}u,size:%{public}d", sensorId, COMMON_DIMENSION); return COMMON_DIMENSION; } } diff --git a/services/sensor/src/sensor_manager.cpp b/services/sensor/src/sensor_manager.cpp index 3a8255c8..b729aeae 100644 --- a/services/sensor/src/sensor_manager.cpp +++ b/services/sensor/src/sensor_manager.cpp @@ -69,7 +69,7 @@ bool SensorManager::SetBestSensorParams(uint32_t sensorId, int64_t samplingPerio } bestSamplingPeriodNs = (samplingPeriodNs < bestSamplingPeriodNs) ? samplingPeriodNs : bestSamplingPeriodNs; bestReportDelayNs = (maxReportDelayNs < bestReportDelayNs) ? maxReportDelayNs : bestReportDelayNs; - SEN_HILOGD("bestSamplingPeriodNs : %{public}" PRId64, bestSamplingPeriodNs); + SEN_HILOGD("bestSamplingPeriodNs:%{public}" PRId64, bestSamplingPeriodNs); auto ret = sensorHdiConnection_.SetBatch(sensorId, bestSamplingPeriodNs, bestReportDelayNs); if (ret != ERR_OK) { SEN_HILOGE("SetBatch is failed"); @@ -153,12 +153,12 @@ bool SensorManager::IsOtherClientUsingSensor(uint32_t sensorId, int32_t clientPi { CALL_LOG_ENTER; if (clientInfo_.OnlyCurPidSensorEnabled(sensorId, clientPid)) { - SEN_HILOGW("Only current client using this sensor"); + SEN_HILOGI("Only current client using this sensor"); return false; } clientInfo_.ClearCurPidSensorInfo(sensorId, clientPid); if (!ResetBestSensorParams(sensorId)) { - SEN_HILOGW("ResetBestSensorParams is failed"); + SEN_HILOGE("ResetBestSensorParams is failed"); } SEN_HILOGD("other client is using this sensor"); return true; diff --git a/services/sensor/src/sensor_service.cpp b/services/sensor/src/sensor_service.cpp index 377e739d..082d7bc9 100644 --- a/services/sensor/src/sensor_service.cpp +++ b/services/sensor/src/sensor_service.cpp @@ -124,7 +124,7 @@ bool SensorService::InitSensorList() std::lock_guard sensorMapLock(sensorMapMutex_); for (const auto &it : sensors_) { if (!(sensorMap_.insert(std::make_pair(it.GetSensorId(), it)).second)) { - SEN_HILOGW("sensorMap_ Insert failed"); + SEN_HILOGE("sensorMap_ Insert failed"); } } } @@ -140,7 +140,7 @@ void SensorService::OnStop() { CALL_LOG_ENTER; if (state_ == SensorServiceState::STATE_STOPPED) { - SEN_HILOGW("already stopped"); + SEN_HILOGI("already stopped"); return; } state_ = SensorServiceState::STATE_STOPPED; @@ -175,7 +175,7 @@ void SensorService::ReportOnChangeData(uint32_t sensorId) return; } if ((SENSOR_ON_CHANGE & it->second.GetFlags()) != SENSOR_ON_CHANGE) { - SEN_HILOGW("it is not onchange data, no need to report"); + SEN_HILOGI("it is not onchange data, no need to report"); return; } SensorData sensorData; @@ -230,7 +230,7 @@ ErrCode SensorService::EnableSensor(uint32_t sensorId, int64_t samplingPeriodNs, uint32_t flag = sensorManager_.GetSensorFlag(sensorId); ret = flushInfo_.FlushProcess(sensorId, flag, pid, true); if (ret != ERR_OK) { - SEN_HILOGE("ret : %{public}d", ret); + SEN_HILOGE("ret:%{public}d", ret); } ReportOnChangeData(sensorId); return ERR_OK; @@ -265,7 +265,7 @@ ErrCode SensorService::DisableSensor(uint32_t sensorId, int32_t pid) ReportSensorSysEvent(sensorId, false, pid); std::lock_guard serviceLock(serviceLock_); if (sensorManager_.IsOtherClientUsingSensor(sensorId, pid)) { - SEN_HILOGW("other client is using this sensor now, cannot disable"); + SEN_HILOGI("other client is using this sensor now, cannot disable"); return ERR_OK; } if (sensorHdiConnection_.DisableSensor(sensorId) != ERR_OK) { diff --git a/services/sensor/src/sensor_service_stub.cpp b/services/sensor/src/sensor_service_stub.cpp index 554843f2..92ae66e2 100644 --- a/services/sensor/src/sensor_service_stub.cpp +++ b/services/sensor/src/sensor_service_stub.cpp @@ -56,7 +56,7 @@ SensorServiceStub::~SensorServiceStub() int32_t SensorServiceStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) { - SEN_HILOGD("begin, cmd : %{public}u", code); + SEN_HILOGD("begin, cmd:%{public}u", code); std::u16string descriptor = SensorServiceStub::GetDescriptor(); std::u16string remoteDescriptor = data.ReadInterfaceToken(); if (descriptor != remoteDescriptor) { diff --git a/services/sensor/src/sensor_suspend_policy.cpp b/services/sensor/src/sensor_suspend_policy.cpp index 1e9f2444..023a1300 100644 --- a/services/sensor/src/sensor_suspend_policy.cpp +++ b/services/sensor/src/sensor_suspend_policy.cpp @@ -49,7 +49,7 @@ ErrCode SensorSuspendPolicy::DisableSensor(uint32_t sensorId, int32_t pid) return ERR_NO_INIT; } if (sensorManager_.IsOtherClientUsingSensor(sensorId, pid)) { - SEN_HILOGW("other client is using this sensor now, cannot disable"); + SEN_HILOGI("other client is using this sensor now, cannot disable"); return ERR_OK; } if (interface_.DisableSensor(sensorId) != ERR_OK) { @@ -117,7 +117,7 @@ ErrCode SensorSuspendPolicy::EnableSensor(uint32_t sensorId, int32_t pid, int64_ uint32_t flag = sensorManager_.GetSensorFlag(sensorId); ret = flushInfo_.FlushProcess(sensorId, flag, pid, true); if (ret != ERR_OK) { - SEN_HILOGW("ret:%{public}d", ret); + SEN_HILOGI("ret:%{public}d", ret); } return ERR_OK; } @@ -143,7 +143,7 @@ std::vector SensorSuspendPolicy::GetSensorIdByPid(int32_t pid) SEN_HILOGD("pid:%{public}d found", pid); return it->second; } - SEN_HILOGD("pid:%{public}d not found", pid); + SEN_HILOGE("pid:%{public}d not found", pid); return {}; } diff --git a/utils/src/sensor_basic_data_channel.cpp b/utils/src/sensor_basic_data_channel.cpp index 3532b9cf..8478fbe6 100755 --- a/utils/src/sensor_basic_data_channel.cpp +++ b/utils/src/sensor_basic_data_channel.cpp @@ -56,27 +56,27 @@ int32_t SensorBasicDataChannel::CreateSensorBasicChannel() } // set socket attr if (setsockopt(socketPair[0], SOL_SOCKET, SO_SNDBUF, &SENSOR_READ_DATA_SIZE, sizeof(SENSOR_READ_DATA_SIZE)) != 0) { - SEN_HILOGE("setsockopt socketpair 0, SNDBUF failed, errno: %{public}d", errno); + SEN_HILOGE("setsockopt socketpair 0, SNDBUF failed, errno:%{public}d", errno); goto CLOSE_SOCK; } if (setsockopt(socketPair[1], SOL_SOCKET, SO_RCVBUF, &SENSOR_READ_DATA_SIZE, sizeof(SENSOR_READ_DATA_SIZE)) != 0) { - SEN_HILOGE("setsockopt socketpair 1, RCVBUF failed, errno: %{public}d", errno); + SEN_HILOGE("setsockopt socketpair 1, RCVBUF failed, errno:%{public}d", errno); goto CLOSE_SOCK; } if (setsockopt(socketPair[0], SOL_SOCKET, SO_RCVBUF, &DEFAULT_CHANNEL_SIZE, sizeof(DEFAULT_CHANNEL_SIZE)) != 0) { - SEN_HILOGE("setsockopt socketpair 0, RCVBUF failed, errno: %{public}d", errno); + SEN_HILOGE("setsockopt socketpair 0, RCVBUF failed, errno:%{public}d", errno); goto CLOSE_SOCK; } if (setsockopt(socketPair[1], SOL_SOCKET, SO_SNDBUF, &DEFAULT_CHANNEL_SIZE, sizeof(DEFAULT_CHANNEL_SIZE)) != 0) { - SEN_HILOGE("setsockopt socketpair 1, SNDBUF failed, errno: %{public}d", errno); + SEN_HILOGE("setsockopt socketpair 1, SNDBUF failed, errno:%{public}d", errno); goto CLOSE_SOCK; } if (fcntl(socketPair[0], F_SETFL, O_NONBLOCK) != 0) { - SEN_HILOGE("fcntl socketpair 0 failed, errno: %{public}d", errno); + SEN_HILOGE("fcntl socketpair 0 failed, errno:%{public}d", errno); goto CLOSE_SOCK; } if (fcntl(socketPair[1], F_SETFL, O_NONBLOCK) != 0) { - SEN_HILOGE("fcntl socketpair 1 failed, errno: %{public}d", errno); + SEN_HILOGE("fcntl socketpair 1 failed, errno:%{public}d", errno); goto CLOSE_SOCK; } sendFd_ = socketPair[0]; -- Gitee