!1011 修复日志打印问题

Merge pull request !1011 from liuziwei/master
This commit is contained in:
openharmony_ci 2024-08-24 09:30:07 +00:00 committed by Gitee
commit 3287bc1071
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -61,8 +61,9 @@ constexpr char STR_OPERATION_TIME[] = "OPERATION_TIME";
static std::string MaskForStringId(const std::string &id)
{
const int32_t MASK_WIDTH = 64;
if (id.length() != MASK_WIDTH) {
const int32_t MASK_WIDTH = 2;
const int32_t STRING_ID_LENGTH = 64;
if (id.length() != STRING_ID_LENGTH) {
return "****";
}
return id.substr(0, MASK_WIDTH) + "**" + id.substr(id.length() - MASK_WIDTH, id.length());