From 1a62be2eee84a6ed5efd9c68c3c95479e6208bd5 Mon Sep 17 00:00:00 2001 From: liyaoyao777 Date: Wed, 28 Aug 2024 10:53:41 +0800 Subject: [PATCH] Rectification log printing is not standard Signed-off-by: liyaoyao777 --- frameworks/js/napi/src/sensor_js.cpp | 2 +- frameworks/native/src/sensor_data_channel.cpp | 2 +- services/src/sensor_dump.cpp | 2 +- utils/ipc/src/stream_socket.cpp | 4 ++-- vibration_convert/core/native/src/vibration_convert_core.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frameworks/js/napi/src/sensor_js.cpp b/frameworks/js/napi/src/sensor_js.cpp index 35f75851..1ddbfe29 100644 --- a/frameworks/js/napi/src/sensor_js.cpp +++ b/frameworks/js/napi/src/sensor_js.cpp @@ -75,7 +75,7 @@ static bool copySensorData(sptr callbackInfo, SensorEvent *ev callbackInfo->data.sensorData.sensorAccuracy = event->option; CHKPF(event->data); if (event->dataLen < sizeof(float)) { - SEN_HILOGE("Event dataLen less than float size."); + SEN_HILOGE("Event dataLen less than float size"); return false; } auto data = reinterpret_cast(event->data); diff --git a/frameworks/native/src/sensor_data_channel.cpp b/frameworks/native/src/sensor_data_channel.cpp index c5473295..4a2bfc13 100644 --- a/frameworks/native/src/sensor_data_channel.cpp +++ b/frameworks/native/src/sensor_data_channel.cpp @@ -40,7 +40,7 @@ int32_t SensorDataChannel::RestoreSensorDataChannel() { CHKPR(dataCB_, SENSOR_NATIVE_REGSITER_CB_ERR); if (GetReceiveDataFd() != -1) { - SEN_HILOGW("Restore sensor data channel failed, please destroy sensor data channel first."); + SEN_HILOGW("Restore sensor data channel failed, please destroy sensor data channel first"); return SENSOR_CHANNEL_RESTORE_FD_ERR; } return InnerSensorDataChannel(); diff --git a/services/src/sensor_dump.cpp b/services/src/sensor_dump.cpp index 93950201..767222bb 100644 --- a/services/src/sensor_dump.cpp +++ b/services/src/sensor_dump.cpp @@ -332,7 +332,7 @@ std::string SensorDump::GetDataBySensorId(int32_t sensorId, SensorData &sensorDa std::string str; int32_t dataLen = GetDataDimension(sensorId); if (sensorData.dataLen < sizeof(float)) { - SEN_HILOGE("SensorData dataLen less than float size."); + SEN_HILOGE("SensorData dataLen less than float size"); return str; } auto data = reinterpret_cast(sensorData.data); diff --git a/utils/ipc/src/stream_socket.cpp b/utils/ipc/src/stream_socket.cpp index 48c3fed9..e77dbb1d 100644 --- a/utils/ipc/src/stream_socket.cpp +++ b/utils/ipc/src/stream_socket.cpp @@ -52,7 +52,7 @@ void StreamSocket::OnReadPackets(CircleStreamBuffer &circBuf, StreamSocket::Pack PackHead *head = reinterpret_cast(buf); CHKPB(head); if (head->size < 0 || head->size > MAX_PACKET_BUF_SIZE) { - SEN_HILOGE("Packet header parsing error, and this error cannot be recovered. The buffer will be reset." + SEN_HILOGE("Packet header parsing error, and this error cannot be recovered. The buffer will be reset" " head->size:%{public}zu, unreadSize:%{public}zu", head->size, unreadSize); circBuf.Reset(); break; @@ -67,7 +67,7 @@ void StreamSocket::OnReadPackets(CircleStreamBuffer &circBuf, StreamSocket::Pack break; } if (!circBuf.SeekReadPos(pkt.GetPacketLength())) { - SEN_HILOGW("Set read position error, and this error cannot be recovered, and the buffer will be reset." + SEN_HILOGW("Set read position error, and this error cannot be recovered, and the buffer will be reset" " packetSize:%{public}zu, unreadSize:%{public}zu", pkt.GetPacketLength(), unreadSize); circBuf.Reset(); break; diff --git a/vibration_convert/core/native/src/vibration_convert_core.cpp b/vibration_convert/core/native/src/vibration_convert_core.cpp index aca84d95..22b1db4b 100644 --- a/vibration_convert/core/native/src/vibration_convert_core.cpp +++ b/vibration_convert/core/native/src/vibration_convert_core.cpp @@ -545,7 +545,7 @@ int32_t VibrationConvertCore::ConvertTransientEvent(const std::vector &d IsolatedEnvelopeInfo isolatedEnvelopeInfo; int32_t ret = peakFinder_.ObtainTransientByAmplitude(datas, isolatedEnvelopeInfo); if (ret != Sensors::SUCCESS) { - SEN_HILOGE("ObtainTransientByAmplitude failed."); + SEN_HILOGE("ObtainTransientByAmplitude failed"); return ret; } if (!isolatedEnvelopeInfo.isHaveContinuousEvent) { -- Gitee